From 90a09c422b9dcd85c2a970ea4b242add3dd13e80 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 1 Oct 2018 09:57:27 +0200 Subject: [PATCH] [WIP] Use same variable names in target-helper mode --- dev/ofunctions.sh | 8 +++++--- target-helper.conf.example | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 890d8dd..4b99bd2 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -8,7 +8,7 @@ #### OFUNCTIONS FULL SUBSET #### #### OFUNCTIONS MINI SUBSET #### _OFUNCTIONS_VERSION=2.3.0-RC1 -_OFUNCTIONS_BUILD=2018093004 +_OFUNCTIONS_BUILD=2018100101 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -1994,12 +1994,14 @@ function PostInit { # Define remote commands if [ -f "$SSH_RSA_PRIVATE_KEY" ]; then SSH_CMD="$(type -p ssh) $SSH_COMP -q -i $SSH_RSA_PRIVATE_KEY $SSH_OPTS $REMOTE_USER@$REMOTE_HOST -p $REMOTE_PORT" - SSH_REVERSE_CMD="$(type -p ssh) $SSH_COMP -q -i $INITIATOR_SSH_RSA_PRIVATE_KEY $SSH_OPTS $INITIATOR_REMOTE_USER@$INITIATOR_REMOTE_HOST -p $INITIATOR_REMOTE_PORT" + #WIP + #SSH_REVERSE_CMD="$(type -p ssh) $SSH_COMP -q -i $INITIATOR_SSH_RSA_PRIVATE_KEY $SSH_OPTS $INITIATOR_REMOTE_USER@$INITIATOR_REMOTE_HOST -p $INITIATOR_REMOTE_PORT" SCP_CMD="$(type -p scp) $SSH_COMP -q -i $SSH_RSA_PRIVATE_KEY -P $REMOTE_PORT" RSYNC_SSH_CMD="$(type -p ssh) $SSH_COMP -q -i $SSH_RSA_PRIVATE_KEY $SSH_OPTS -p $REMOTE_PORT" elif [ -f "$SSH_PASSWORD_FILE" ]; then SSH_CMD="$(type -p sshpass) -f $SSH_PASSWORD_FILE $(type -p ssh) $SSH_COMP -q $SSH_OPTS $REMOTE_USER@$REMOTE_HOST -p $REMOTE_PORT" - SSH_REVERSE_CMD="$(type -p sshpass) -f $INITIATOR_SSH_PASSWORD_FILE $(type -p ssh) $SSH_COMP -q $SSH_OPTS $INITIATOR_REMOTE_USER@$INITIATOR_REMOTE_HOST -p $INITIATOR_REMOTE_PORT" + #WIP + #SSH_REVERSE_CMD="$(type -p sshpass) -f $INITIATOR_SSH_PASSWORD_FILE $(type -p ssh) $SSH_COMP -q $SSH_OPTS $INITIATOR_REMOTE_USER@$INITIATOR_REMOTE_HOST -p $INITIATOR_REMOTE_PORT" SCP_CMD="$(type -p sshpass) -f $SSH_PASSWORD_FILE $(type -p scp) $SSH_COMP -q -P $REMOTE_PORT" RSYNC_SSH_CMD="$(type -p sshpass) -f $SSH_PASSWORD_FILE $(type -p ssh) $SSH_COMP -q $SSH_OPTS -p $REMOTE_PORT" else diff --git a/target-helper.conf.example b/target-helper.conf.example index ce711ca..5e65b92 100644 --- a/target-helper.conf.example +++ b/target-helper.conf.example @@ -2,12 +2,12 @@ ###### osync - Rsync based two way sync engine with fault tolerance ###### (C) 2013-2018 by Orsiris de Jong (www.netpower.fr) -###### v1.3x target helper config file rev 2017060501 +###### v1.3x target helper config file rev 2018100101 ## ---------- GENERAL OPTIONS ## Sync job identification -INSTANCE_ID="sync_test" +INSTANCE_ID="target_test" ## Directories to synchronize. ## Initiator is the system osync runs on. The initiator directory must be a local path. @@ -18,10 +18,10 @@ INITIATOR_SYNC_DIR="/home/git/osync/dir1" TARGET_SYNC_DIR="/home/git/osync/dir2" ## If the target system is remote, you can specify a RSA key (please use full path). If not defined, the default ~/.ssh/id_rsa will be used. See documentation for further information. -INITIATOR_SSH_RSA_PRIVATE_KEY="/home/backupuser/.ssh/id_rsa" +SSH_RSA_PRIVATE_KEY="/home/backupuser/.ssh/id_rsa" ## Alternatively, you may specify an SSH password file (less secure). Needs sshpass utility installed. -INITIATOR_SSH_PASSWORD_FILE="" +SSH_PASSWORD_FILE="" ## When using ssh filter, you must specify a remote token matching the one setup in authorized_keys _REMOTE_TOKEN=SomeAlphaNumericToken9