added check for truenas to be online

This commit is contained in:
2023-10-10 18:39:21 -05:00
parent 56c756e29d
commit 21dfd6b42d

View File

@@ -1,3 +1,10 @@
#!/bin/bash #!/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