added script to remove wrestic and unmount drives
This commit is contained in:
10
wrestic/wrestic-backup-to-truenas.sh
Normal file
10
wrestic/wrestic-backup-to-truenas.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
11
wrestic/wrestic-remove.sh
Normal file
11
wrestic/wrestic-remove.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo rm /home/akanealw/.config/wrestic/*
|
||||
sudo rm /home/akanealw/scripts/wrestic-backup-to-truenas.sh
|
||||
sudo rm /usr/local/bin/wrestic
|
||||
|
||||
if [[ ! -f /etc/profile.d/mount-shared-drives.sh ]]
|
||||
then
|
||||
sudo umount /mnt/* -v
|
||||
echo "Shared folders have been unmounted"
|
||||
fi
|
||||
Reference in New Issue
Block a user