summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-10-01 23:14:49 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-10-01 23:14:49 -0700
commit68090f7ada71f57f83d78f798148411f05721e7a (patch)
tree431a87133b189c610f6484d34f73c5ee1c1f9c91
parentbbd2ee6851776b2e63a644a42e92e521f047e326 (diff)
downloaddotfiles-68090f7ada71f57f83d78f798148411f05721e7a.tar.gz
workstation-duplicity sends notification when successful
-rwxr-xr-xbin/workstation-duplicity6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/workstation-duplicity b/bin/workstation-duplicity
index cec03722..d40681c3 100755
--- a/bin/workstation-duplicity
+++ b/bin/workstation-duplicity
@@ -4,6 +4,9 @@ set -e
. $HOME/.shenv
+# this should ensure that notify-send works when script is run by crond
+export XDG_RUNTIME_DIR=/run/user/$(id -u)
+
FLAG_FILE="$HOME/local/duplicity-flag-file"
DUPLY_PROFILE="$(hostname -s)-$(whoami)-home"
@@ -59,3 +62,6 @@ fi
# if it was successful, update flag file so cronjob doesn't do this
# again for four hours
touch $FLAG_FILE
+
+notify-send --urgency=low --icon=package_network \
+ "duplicity incremental backup @ $(date '+%-l:%M%#p %Z')" ||: