testing
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /root/scripts/restic
|
||||
rm /root/scripts/restic/*
|
||||
mkdir -p /root/scripts/restic > /dev/null 2>&1
|
||||
rm /root/scripts/restic/* > /dev/null 2>&1
|
||||
wget -q http://192.168.1.50/scripts/restic/restic-sftp/restic-sftp-backup.sh
|
||||
wget -q http://192.168.1.50/scripts/restic/restic-sftp/export-etc.sh
|
||||
wget -q http://192.168.1.50/scripts/restic/restic-sftp/export-home-akanealw.sh
|
||||
@@ -13,7 +13,7 @@ mv /root/restic-sftp-* /root/scripts/restic
|
||||
mv /root/export-* /root/scripts/restic
|
||||
chmod +x /root/scripts/restic/*
|
||||
|
||||
isInFile=$(cat /root/.ssh/config | grep -c "truenas")
|
||||
isInFile=$(cat /root/.ssh/config | grep -c "truenas") > /dev/null 2>&1
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
echo "" >> /root/.ssh/config
|
||||
@@ -26,7 +26,7 @@ if [ $isInFile -eq 0 ]
|
||||
chmod 600 /root/.ssh/config
|
||||
fi
|
||||
|
||||
if [[ ! -f /root/.ssh/truenas ]]
|
||||
if [[ ! -f /root/.ssh/truenas ]] > /dev/null 2>&1
|
||||
then
|
||||
echo "-----BEGIN OPENSSH PRIVATE KEY-----" > /root/.ssh/truenas
|
||||
echo "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW" >> /root/.ssh/truenas
|
||||
|
||||
Reference in New Issue
Block a user