diff --git a/bin/snap-sync-wrapper b/bin/snap-sync-wrapper new file mode 100755 index 0000000..dc26616 --- /dev/null +++ b/bin/snap-sync-wrapper @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo -u $USER DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus notify-send 'Starting snap-sync backups to $1...' --icon=dialog-information + +#/usr/bin/snap-sync --UUID $1 --noconfirm +if [[ $? == 0 ]]; then + sudo -u $USER DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus notify-send 'snap-sync backups to $1 complete!' --icon=dialog-information +else + sudo -u $USER DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus notify-send 'Error in snap-sync backups. Check journal for more information.' --icon=dialog-information +fi