Start using notify-send again (works with systemd)
Also remove the 3 second sleep and unnecessary environment variables.
This commit is contained in:
parent
5993210ddd
commit
a4ed52de4f
|
@ -7,6 +7,7 @@
|
|||
# Nofication function
|
||||
notify() {
|
||||
test -z "$RESTIC_QUIET" && echo "I: $1"
|
||||
notify-send -t 10000 -i drive-harddisk "Restic Backup" "$1"
|
||||
}
|
||||
|
||||
# Check if a --verbose argument is passed, otherwise use quiet
|
||||
|
@ -15,9 +16,6 @@ if [ "$1" = "--verbose" ]; then
|
|||
RESTIC_QUIET=""
|
||||
fi
|
||||
|
||||
# Allow for connecting to the SSH agent
|
||||
export SSH_AUTH_SOCK=/run/user/$UID/keyring/ssh
|
||||
|
||||
# Restic settings
|
||||
RESTIC_BACKUP_OPTIONS="--exclude-file=$HOME/.config/restic/exclude --cleanup-cache"
|
||||
RESTIC_FORGET_OPTIONS="--keep-weekly=4 --keep-monthly=12 --keep-yearly=60"
|
||||
|
@ -26,7 +24,6 @@ export RESTIC_REPOSITORY="sftp://void//media/Backup/paul/restic-laptops"
|
|||
|
||||
# Start the backup by asking for the passphrase
|
||||
notify "Starting backup…"
|
||||
sleep 3
|
||||
export RESTIC_PASSWORD=$(zenity --title="Restic backup passphrase" --password)
|
||||
|
||||
if [ -z "$RESTIC_PASSWORD" ]; then
|
||||
|
|
Loading…
Reference in New Issue