mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Check for rsync on remote host
This commit is contained in:
parent
393924a836
commit
4d824c54eb
@ -215,4 +215,4 @@ For those who really love Pi-hole and Gravity Sync. Combining the best of both w
|
|||||||
2. The VIPs are managed by the keepalived service on each side and will determine which of two Pi-hole responds. You can make your configuration changes to the active VIP address on either side.
|
2. The VIPs are managed by the keepalived service on each side and will determine which of two Pi-hole responds. You can make your configuration changes to the active VIP address on either side.
|
||||||
3. Client queries one of the two VIP servers, and the responding Pi-hole does it's thing.
|
3. Client queries one of the two VIP servers, and the responding Pi-hole does it's thing.
|
||||||
|
|
||||||
Here we use `./gravity-sync pull` on the secondary Pi-hole at each side, and ofset the update intervals from the main sync.
|
Here we use `./gravity-sync pull` on the secondary Pi-hole at each side, and off-set the update intervals from the main sync.
|
@ -1013,6 +1013,23 @@ function detect_ssh {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function detect_remotersync {
|
||||||
|
MESSAGE="Validating RSYNC Installed on ${REMOTE_HOST}"
|
||||||
|
echo_stat
|
||||||
|
|
||||||
|
REMOTERSYNC=$(${SSHPASSWORD} ${SSH_CMD} -p ${SSH_PORT} -i "$HOME/${SSH_PKIF}" ${REMOTE_USER}@${REMOTE_HOST} "hash rsync")
|
||||||
|
|
||||||
|
if [ "${REMOTERSYNC}" == "-bash: hash: rsync: not found"
|
||||||
|
then
|
||||||
|
echo_fail
|
||||||
|
MESSAGE="Please install RSYNC on ${REMOTE_HOST}"
|
||||||
|
echo_info
|
||||||
|
exit_nochange
|
||||||
|
else
|
||||||
|
echo_good
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
## Error Validation
|
## Error Validation
|
||||||
function error_validate {
|
function error_validate {
|
||||||
if [ "$?" != "0" ]
|
if [ "$?" != "0" ]
|
||||||
@ -1304,6 +1321,8 @@ function config_generate {
|
|||||||
echo_info
|
echo_info
|
||||||
|
|
||||||
validate_os_sshpass
|
validate_os_sshpass
|
||||||
|
|
||||||
|
detect_remotersync
|
||||||
|
|
||||||
exit_withchange
|
exit_withchange
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user