fixed script name :)
This commit is contained in:
23
debian/debian-download-configure-wrestic.sh
vendored
Normal file
23
debian/debian-download-configure-wrestic.sh
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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/changemepls/$HOSTNAME/g" /home/akanealw/.config/wrestic/wrestic.toml
|
||||
sed -r 's/(resticbackups)(.*)/\1\L\2\E/g' /home/akanealw/.config/wrestic/wrestic.toml > /home/akanealw/.config/wrestic/wrestic2.toml
|
||||
mv /home/akanealw/.config/wrestic/wrestic.toml /home/akanealw/.config/wrestic/wresticbackup.toml
|
||||
mv /home/akanealw/.config/wrestic/wrestic2.toml /home/akanealw/.config/wrestic/wrestic.toml
|
||||
rm .config/wrestic/wresticbackup.toml
|
||||
chown -R akanealw:akanealw /home/akanealw/.config
|
||||
chown -R akanealw:akanealw /home/akanealw/restic
|
||||
chmod +x /usr/local/bin/wrestic
|
||||
Reference in New Issue
Block a user