From 68090f7ada71f57f83d78f798148411f05721e7a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 1 Oct 2020 23:14:49 -0700 Subject: workstation-duplicity sends notification when successful --- bin/workstation-duplicity | 6 ++++++ 1 file changed, 6 insertions(+) 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')" ||: -- cgit v1.2.3