From 948fb19ec209a5aa4bf9a7b362bebb73956816b5 Mon Sep 17 00:00:00 2001 From: akanealw Date: Thu, 14 Mar 2024 10:48:59 -0500 Subject: [PATCH] testing --- restic/restic-sftp/install-restic-sftp.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/restic/restic-sftp/install-restic-sftp.sh b/restic/restic-sftp/install-restic-sftp.sh index 17a093f..1baa20c 100644 --- a/restic/restic-sftp/install-restic-sftp.sh +++ b/restic/restic-sftp/install-restic-sftp.sh @@ -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