This commit is contained in:
		| @@ -14,11 +14,16 @@ let | |||||||
|       echo "========== BACKUP HOME STARTING ==========" |       echo "========== BACKUP HOME STARTING ==========" | ||||||
|       export RESTIC_PASSWORD="gunter.home.2rjus.net" |       export RESTIC_PASSWORD="gunter.home.2rjus.net" | ||||||
|       export RESTIC_REPOSITORY="rest:http://10.69.12.52:8000/gunter.home.2rjus.net" |       export RESTIC_REPOSITORY="rest:http://10.69.12.52:8000/gunter.home.2rjus.net" | ||||||
|       GOTIFY_TOKEN=$(<"$XDG_CONFIG_HOME/sops-nix/secrets/gotify_backup_home") |       SECRET_PATH="$XDG_CONFIG_HOME/sops-nix/secrets/gotify_backup_home" | ||||||
|  |  | ||||||
|  |       if ! [ -f "$SECRET_PATH" ]; then | ||||||
|  |         notify-send -u critical "Backup issue" "Secret file for gotify token does not exist" | ||||||
|  |       else | ||||||
|  |         GOTIFY_TOKEN=$(<"$SECRET_PATH") | ||||||
|         if [ -z "$GOTIFY_TOKEN" ]; then |         if [ -z "$GOTIFY_TOKEN" ]; then | ||||||
|           notify-send -u critical "Backup issue" "No Gotify token found" |           notify-send -u critical "Backup issue" "No Gotify token found" | ||||||
|         fi |         fi | ||||||
|  |       fi | ||||||
|  |  | ||||||
|       # Send start notification |       # Send start notification | ||||||
|       notify-send -e -t 3000 "Backup started" "Backup of /home/torjus started" |       notify-send -e -t 3000 "Backup started" "Backup of /home/torjus started" | ||||||
| @@ -85,7 +90,6 @@ let | |||||||
|   }; |   }; | ||||||
| in | in | ||||||
| { | { | ||||||
|  |  | ||||||
|   sops.secrets."gotify_backup_home" = { }; |   sops.secrets."gotify_backup_home" = { }; | ||||||
|  |  | ||||||
|   systemd.user.services.backup-home = { |   systemd.user.services.backup-home = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user