This commit is contained in:
Michael Stanclift 2020-06-03 00:07:54 -05:00
parent 54efb9858a
commit af11f11a6b

View File

@ -153,9 +153,6 @@ function pull_gs {
RSYNC_SOURCE="${PIHOLE_DIR}/${GRAVITY_FI}"
RSYNC_TARGET="$HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.pull"
create_rsynccmd
${RSYNC_SEND} # >/dev/null 2>&1
echo -en ${RSYNC_SEND}
#error_validate
#${SSHPASSWORD} rsync -e "${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${PIHOLE_DIR}/${GRAVITY_FI} $HOME/${LOCAL_FOLDR}/${BACKUP_FOLD}/${GRAVITY_FI}.pull >/dev/null 2>&1
#error_validate
@ -654,13 +651,13 @@ function create_rsynccmd {
then
if [ -z "$SSHPASSWORD" ]
then
RSYNC_SEND="rsync -e \"${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}\" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}"
rsync -e "${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}\" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
else
RSYNC_SEND="rsync -v -e ''${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}'' ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}"
rsync -e "${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
fi
elif hash dbclient 2>/dev/null
then
RSYNC_SEND="rsync -e \"${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}\" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}"
rsync -e "${SSH_CMD} -p ${SSH_PORT} -i $HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST}:${RSYNC_SOURCE} ${RSYNC_TARGET}
fi
}