added if statement for wrestic

This commit is contained in:
2023-10-10 18:33:44 -05:00
parent 1756ff2483
commit 2fa43a47ec

View File

@@ -6,6 +6,8 @@ if [ "$EUID" -ne 0 ]
exit exit
fi fi
if [[ ! -f /home/akanealw/.config/wrestic/wrestic.toml ]]
then
apt update apt update
apt-get install -y restic apt-get install -y restic
mkdir -pv /home/akanealw/.config/wrestic mkdir -pv /home/akanealw/.config/wrestic
@@ -24,3 +26,6 @@ chown -R akanealw:akanealw /home/akanealw/restic
chown -R akanealw:akanealw /home/akanealw/scripts chown -R akanealw:akanealw /home/akanealw/scripts
chmod +x /home/akanealw/scripts/wrestic-backup-to-truenas.sh chmod +x /home/akanealw/scripts/wrestic-backup-to-truenas.sh
chmod +x /usr/local/bin/wrestic chmod +x /usr/local/bin/wrestic
else
echo "Wrestic is already configured."
fi