diff --git a/restic/restic-sftp/install-restic-sftp.sh b/restic/restic-sftp/install-restic-sftp.sh index 1baa20c..ea8c53e 100644 --- a/restic/restic-sftp/install-restic-sftp.sh +++ b/restic/restic-sftp/install-restic-sftp.sh @@ -13,7 +13,8 @@ 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") > /dev/null 2>&1 +if [[ ! -f /root/.ssh/config ]]; then touch /root/.ssh/config +isInFile=$(cat /root/.ssh/config | grep -c "truenas") if [ $isInFile -eq 0 ] then echo "" >> /root/.ssh/config