added wrestic lxc script

This commit is contained in:
2023-10-11 20:11:45 -05:00
parent 672b64c558
commit fbbc126a8e
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
if [ "$EUID" -ne 0 ]
then
echo "Please run as root"
exit
fi
if [[ ! -f /home/akanealw/.config/wrestic/wrestic.toml ]]
then
apt update
apt-get install -y restic
mkdir -pv /home/akanealw/.config/wrestic
mkdir -pv /home/akanealw/restic/restore
mkdir -pv /home/akanealw/scripts
mkdir -pv /root/restic/restore
wget -qO /usr/local/bin/wrestic http://192.168.1.50/files/wrestic/wrestic
wget -qO /home/akanealw/.config/wrestic/wrestic.toml http://192.168.1.50/files/wrestic/wrestic-lxc.toml
wget -qO /home/akanealw/scripts/wrestic-backup-to-truenas.sh http://192.168.1.50/scripts/wrestic/wrestic-backup-to-truenas-lxc.sh
chown -R akanealw:akanealw /home/akanealw/.config
chown -R akanealw:akanealw /home/akanealw/restic
chown -R akanealw:akanealw /home/akanealw/scripts
chmod +x /home/akanealw/scripts/wrestic-backup-to-truenas.sh
chmod +x /usr/local/bin/wrestic
else
echo "Wrestic is already configured."
fi

View File