fix: osh-sync-watcher: default to a valid rshcmd (fixes #433)

pull/449/head
Stéphane Lesimple 2 years ago committed by Stéphane Lesimple
parent ad9e14d568
commit fd6850c7ef

@ -62,6 +62,12 @@ if [ "$enabled" != "1" ] ; then
exit 0
fi
# check that rshcmd is not empty after loading the config
if [ -z "$rshcmd" ]; then
_err "The 'rshcmd' mandatory config value is empty, please review the configuration ($configfile)"
exit 1
fi
# is another copy of myself still running ?
if [ -e "$PIDFILE" ] ; then
oldpid=$(head -1 "$PIDFILE")

@ -93,9 +93,9 @@ rshcmd
:Default: ``""``
:Example: ``"ssh -q -i /root/.ssh/id_master2slave"``
:Example: ``"ssh -q -i /root/.ssh/id_master2slave -o StrictHostKeyChecking=accept-new"``
This value will be passed as the ``--rsh`` parameter of ``rsync`` (don't use ``-p`` to specify the port heree, use the ``remotehostlist`` config below instead), this can be used to specify which SSH key to use, for example. Note that this option is mandatory (if you don't have anything to specify here, you can just say ``ssh``).
This value will be passed as the ``--rsh`` parameter of ``rsync`` (don't use ``-p`` to specify the port here, use the ``remotehostlist`` config below instead), this can be used to specify which SSH key to use, for example. NOTE THAT THIS OPTION IS MANDATORY (if you don't have anything to specify here, you can just say ``ssh``). If you followed the standard installation procedure, the "example" value specified below will work.
remoteuser
**********

@ -41,10 +41,10 @@ timeout=120
# >> These options configure how the primary bastion should push its configuration to the secondaries
#
# rshcmd (string)
# DESC: This value will be passed as the ``--rsh`` parameter of ``rsync`` (don't use ``-p`` to specify the port heree, use the ``remotehostlist`` config below instead), this can be used to specify which SSH key to use, for example. Note that this option is mandatory (if you don't have anything to specify here, you can just say ``ssh``).
# DESC: This value will be passed as the ``--rsh`` parameter of ``rsync`` (don't use ``-p`` to specify the port here, use the ``remotehostlist`` config below instead), this can be used to specify which SSH key to use, for example. NOTE THAT THIS OPTION IS MANDATORY (if you don't have anything to specify here, you can just say ``ssh``). If you followed the standard installation procedure, the "example" value specified below will work.
# DEFAULT: ""
# EXAMPLE: "ssh -q -i /root/.ssh/id_master2slave"
rshcmd=""
# EXAMPLE: "ssh -q -i /root/.ssh/id_master2slave -o StrictHostKeyChecking=accept-new"
rshcmd="ssh -q -i /root/.ssh/id_master2slave -o StrictHostKeyChecking=accept-new"
#
# remoteuser (string)
# DESC: The remote user to connect as, using ``ssh`` while rsyncing to secondaries. You probably don't need to change this.

Loading…
Cancel
Save