mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Verify existance of custom.list
This commit is contained in:
parent
e1adcd1105
commit
3e0d06617e
@ -480,28 +480,34 @@ function md5_compare {
|
|||||||
HASHMARK=$((HASHMARK+1))
|
HASHMARK=$((HASHMARK+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MESSAGE="Comparing ${CUSTOM_DNS} Changes"
|
if [ -f ${PIHOLE_DIR}/${CUSTOM_DNS} ]
|
||||||
echo_info
|
|
||||||
|
|
||||||
MESSAGE="Analyzing Remote ${CUSTOM_DNS}"
|
|
||||||
echo_stat
|
|
||||||
primaryCLMD5=$(${SSHPASSWORD} ssh -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "md5sum ${PIHOLE_DIR}/${CUSTOM_DNS}")
|
|
||||||
error_validate
|
|
||||||
|
|
||||||
MESSAGE="Analyzing Local ${CUSTOM_DNS}"
|
|
||||||
echo_stat
|
|
||||||
secondCLMD5=$(md5sum ${PIHOLE_DIR}/${CUSTOM_DNS})
|
|
||||||
error_validate
|
|
||||||
|
|
||||||
if [ "$primaryCLMD5" == "$secondCLMD5" ]
|
|
||||||
then
|
then
|
||||||
MESSAGE="No Differences in ${CUSTOM_DNS}"
|
MESSAGE="Comparing ${CUSTOM_DNS} Changes"
|
||||||
echo_info
|
echo_info
|
||||||
HASHMARK=$((HASHMARK+0))
|
|
||||||
|
MESSAGE="Analyzing Remote ${CUSTOM_DNS}"
|
||||||
|
echo_stat
|
||||||
|
primaryCLMD5=$(${SSHPASSWORD} ssh -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "md5sum ${PIHOLE_DIR}/${CUSTOM_DNS}")
|
||||||
|
error_validate
|
||||||
|
|
||||||
|
MESSAGE="Analyzing Local ${CUSTOM_DNS}"
|
||||||
|
echo_stat
|
||||||
|
secondCLMD5=$(md5sum ${PIHOLE_DIR}/${CUSTOM_DNS})
|
||||||
|
error_validate
|
||||||
|
|
||||||
|
if [ "$primaryCLMD5" == "$secondCLMD5" ]
|
||||||
|
then
|
||||||
|
MESSAGE="No Differences in ${CUSTOM_DNS}"
|
||||||
|
echo_info
|
||||||
|
HASHMARK=$((HASHMARK+0))
|
||||||
|
else
|
||||||
|
MESSAGE="Changes Detected in ${CUSTOM_DNS}"
|
||||||
|
echo_info
|
||||||
|
HASHMARK=$((HASHMARK+1))
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
MESSAGE="Changes Detected in ${CUSTOM_DNS}"
|
MESSAGE="No Local ${CUSTOM_DNS} Detected"
|
||||||
echo_info
|
echo_info
|
||||||
HASHMARK=$((HASHMARK+1))
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$HASHMARK" != "0" ]
|
if [ "$HASHMARK" != "0" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user