diff --git a/restic/wrestic-backup-to-truenas.sh b/restic/wrestic-backup-to-truenas.sh index 270375e..1e111a8 100644 --- a/restic/wrestic-backup-to-truenas.sh +++ b/restic/wrestic-backup-to-truenas.sh @@ -1,3 +1,10 @@ #!/bin/bash -sudo wrestic backup +if ping -c 1 192.168.1.41 > /dev/null 2>&1 + then + if [[ ! -d /mnt/truenas-backups/archivebackups ]] + then + sudo wrestic backup + else + echo "TrueNAS is offline" + fi