add script
This commit is contained in:
10
bin/snap-sync-wrapper
Executable file
10
bin/snap-sync-wrapper
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user