Check existance of remote custom.list

This commit is contained in:
Michael Stanclift 2020-05-29 11:31:38 -05:00
parent 3e0d06617e
commit ca4e99cb1e

View File

@ -485,8 +485,11 @@ function md5_compare {
MESSAGE="Comparing ${CUSTOM_DNS} Changes" MESSAGE="Comparing ${CUSTOM_DNS} Changes"
echo_info echo_info
if ${SSHPASSWORD} ssh -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} test -e ${PIHOLE_DIR}/${CUSTOM_DNS}
then
MESSAGE="Analyzing Remote ${CUSTOM_DNS}" MESSAGE="Analyzing Remote ${CUSTOM_DNS}"
echo_stat echo_stat
primaryCLMD5=$(${SSHPASSWORD} ssh -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "md5sum ${PIHOLE_DIR}/${CUSTOM_DNS}") primaryCLMD5=$(${SSHPASSWORD} ssh -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "md5sum ${PIHOLE_DIR}/${CUSTOM_DNS}")
error_validate error_validate
@ -505,6 +508,10 @@ function md5_compare {
echo_info echo_info
HASHMARK=$((HASHMARK+1)) HASHMARK=$((HASHMARK+1))
fi fi
else
MESSAGE="No Remote ${CUSTOM_DNS} Detected"
echo_info
fi
else else
MESSAGE="No Local ${CUSTOM_DNS} Detected" MESSAGE="No Local ${CUSTOM_DNS} Detected"
echo_info echo_info
@ -512,7 +519,7 @@ function md5_compare {
if [ "$HASHMARK" != "0" ] if [ "$HASHMARK" != "0" ]
then then
MESSAGE="Replication Required" MESSAGE="Replication Suggested"
echo_info echo_info
HASHMARK=$((HASHMARK+0)) HASHMARK=$((HASHMARK+0))
else else