Update gravity-sync.sh

This commit is contained in:
Michael Stanclift 2020-05-25 14:07:38 -05:00
parent 174b43358f
commit e5999539c1

View File

@ -284,13 +284,13 @@ function validate_os_sshpass {
SSHPASSWORD="sshpass -p ${REMOTE_PASS}" SSHPASSWORD="sshpass -p ${REMOTE_PASS}"
MESSAGE="Using SSH Password Authentication" MESSAGE="Using SSH Password Authentication"
else else
sshpassword='' SSHPASSWORD=''
MESSAGE="Using SSH Key-Pair Authentication" MESSAGE="Using SSH Key-Pair Authentication"
fi fi
fi fi
else else
sshpassword='' SSHPASSWORD=''
MESSAGE="Using SSH Key-Pair Authentication" MESSAGE="Using SSH Key-Pair Authentication"
fi fi
@ -298,8 +298,8 @@ function validate_os_sshpass {
MESSAGE="Testing SSH Connection" MESSAGE="Testing SSH Connection"
echo -e "$STAT $MESSAGE" echo -e "$STAT $MESSAGE"
echo -e "${sshpassword} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit'" echo -e "${SSHPASSWORD} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit'"
${sshpassword} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' ${SSHPASSWORD} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit'
error_validate error_validate
} }
@ -360,7 +360,7 @@ function md5_compare {
MESSAGE="Analyzing Remote ${GRAVITY_FI}" MESSAGE="Analyzing Remote ${GRAVITY_FI}"
echo -e "${STAT} ${MESSAGE}" echo -e "${STAT} ${MESSAGE}"
primaryMD5=$(${sshpassword}ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'md5sum /etc/pihole/gravity.db') primaryMD5=$(${SSHPASSWORD} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'md5sum /etc/pihole/gravity.db')
error_validate error_validate
MESSAGE="Analyzing Local ${GRAVITY_FI}" MESSAGE="Analyzing Local ${GRAVITY_FI}"