Files
linux-scripts/debian/debian-configure-wrestic.sh
2023-10-10 13:06:24 -05:00

20 lines
609 B
Bash

#!/bin/bash
if [ "$EUID" -ne 0 ]
then
echo "Please run as root"
exit
fi
apt update
apt-get install -y restic
mkdir -pv /home/akanealw/.config/wrestic
mkdir -pv /home/akanealw/restic/restore
mkdir -pv /root/restic/restore
wget -O /usr/local/bin/wrestic http://192.168.1.50/files/wrestic/wrestic
wget -O /home/akanealw/.config/wrestic/wrestic.toml http://192.168.1.50/files/wrestic/wrestic.toml
#sed -i "s/changeme/$hostname/g" /home/akanealw/.config/wrestic/wrestic.toml
chown -R akanealw:akanealw /home/akanealw/.config
chown -R akanealw:akanealw /home/akanealw/restic
chmod +x /usr/local/bin/wrestic