From 266c0e1e0f358ae0e27c83362ad6df847416c0f2 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 23 Mar 2017 23:03:27 +0100 Subject: [PATCH] Rebuilt targets --- dev/debug_osync.sh | 19 ++++++++++++------- install.sh | 9 ++++++--- osync.sh | 19 +++++++++++++------ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index ff2e632..f91244d 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -3,9 +3,9 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2017 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" -PROGRAM_VERSION=1.2-RC3 -PROGRAM_BUILD=2017021001 -IS_STABLE=no +PROGRAM_VERSION=1.2 +PROGRAM_BUILD=2017032101 +IS_STABLE=yes ##### Execution order #__WITH_PARANOIA_DEBUG ##### Function Name Is parallel #__WITH_PARANOIA_DEBUG @@ -40,8 +40,8 @@ IS_STABLE=no # CleanUp no #__WITH_PARANOIA_DEBUG -_OFUNCTIONS_VERSION=2.1-RC3+dev -_OFUNCTIONS_BUILD=2017031301 +_OFUNCTIONS_VERSION=2.1 +_OFUNCTIONS_BUILD=2017032301 _OFUNCTIONS_BOOTSTRAP=true ## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr @@ -1144,7 +1144,7 @@ function GetLocalOS { *"BSD"*) LOCAL_OS="BSD" ;; - *"MINGW32"*|*"MSYS"*) + *"MINGW32"*|*"MINGW64"*|*"MSYS"*) LOCAL_OS="msys" ;; *"CYGWIN"*) @@ -1243,7 +1243,7 @@ ENDSSH *"BSD"*) REMOTE_OS="BSD" ;; - *"MINGW32"*|*"MSYS"*) + *"MINGW32"*|*"MINGW64"*|*"MSYS"*) REMOTE_OS="msys" ;; *"CYGWIN"*) @@ -4368,6 +4368,11 @@ function SyncOnChanges { fi fi + if [ ! -d "$INITIATOR_SYNC_DIR" ]; then + Logger "Initiator directory [$INITIATOR_SYNC_DIR] does not exist. Cannot monitor." "CRITICAL" + exit 1 + fi + Logger "#### Running osync in file monitor mode." "NOTICE" while true; do diff --git a/install.sh b/install.sh index 5bb2f51..ee428b0 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ PROGRAM_BINARY=$PROGRAM".sh" PROGRAM_BATCH=$PROGRAM"-batch.sh" SSH_FILTER="ssh_filter.sh" -SCRIPT_BUILD=2017031402 +SCRIPT_BUILD=2017032101 ## osync / obackup / pmocr / zsnap install script ## Tested on RHEL / CentOS 6 & 7, Fedora 23, Debian 7 & 8, Mint 17 and FreeBSD 8, 10 and 11 @@ -122,7 +122,7 @@ function GetLocalOS { *"BSD"*) LOCAL_OS="BSD" ;; - *"MINGW32"*|*"MSYS"*) + *"MINGW32"*|*"MINGW64"*|*"MSYS"*) LOCAL_OS="msys" ;; *"CYGWIN"*) @@ -331,7 +331,9 @@ function CopyProgram { function CopyServiceFiles { if ([ "$init" == "systemd" ] && [ -f "$SCRIPT_PATH/$SERVICE_FILE_SYSTEMD_SYSTEM" ]); then CopyFile "$SCRIPT_PATH" "$SERVICE_DIR_SYSTEMD_SYSTEM" "$SERVICE_FILE_SYSTEMD_SYSTEM" "" "" "" true - CopyFile "$SCRIPT_PATH" "$SERVICE_DIR_SYSTEMD_USER" "$SERVICE_FILE_SYSTEMD_USER" "" "" "" true + if [ -f "$SCRIPT_PATH/$SERVICE_FILE_SYSTEMD_SYSTEM_USER" ]; then + CopyFile "$SCRIPT_PATH" "$SERVICE_DIR_SYSTEMD_USER" "$SERVICE_FILE_SYSTEMD_USER" "" "" "" true + fi QuickLogger "Created [$SERVICE_NAME] service in [$SERVICE_DIR_SYSTEMD_SYSTEM] and [$SERVICE_DIR_SYSTEMD_USER]." QuickLogger "Can be activated with [systemctl start SERVICE_NAME@instance.conf] where instance.conf is the name of the config file in $CONF_DIR." @@ -402,6 +404,7 @@ function Usage { echo "options:" echo "--silent Will log and bypass user interaction." echo "--no-stats Used with --silent in order to refuse sending anonymous install stats." + echo "--remove Remove the program." exit 127 } diff --git a/osync.sh b/osync.sh index b8b93bc..7ac85bf 100755 --- a/osync.sh +++ b/osync.sh @@ -3,12 +3,14 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2017 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" -PROGRAM_VERSION=1.2-RC3 -PROGRAM_BUILD=2017021001 +PROGRAM_VERSION=1.2 +PROGRAM_BUILD=2017032101 IS_STABLE=yes -_OFUNCTIONS_VERSION=2.1-RC3+dev -_OFUNCTIONS_BUILD=2017031301 + + +_OFUNCTIONS_VERSION=2.1 +_OFUNCTIONS_BUILD=2017032301 _OFUNCTIONS_BOOTSTRAP=true ## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr @@ -1076,7 +1078,7 @@ function GetLocalOS { *"BSD"*) LOCAL_OS="BSD" ;; - *"MINGW32"*|*"MSYS"*) + *"MINGW32"*|*"MINGW64"*|*"MSYS"*) LOCAL_OS="msys" ;; *"CYGWIN"*) @@ -1174,7 +1176,7 @@ ENDSSH *"BSD"*) REMOTE_OS="BSD" ;; - *"MINGW32"*|*"MSYS"*) + *"MINGW32"*|*"MINGW64"*|*"MSYS"*) REMOTE_OS="msys" ;; *"CYGWIN"*) @@ -4169,6 +4171,11 @@ function SyncOnChanges { fi fi + if [ ! -d "$INITIATOR_SYNC_DIR" ]; then + Logger "Initiator directory [$INITIATOR_SYNC_DIR] does not exist. Cannot monitor." "CRITICAL" + exit 1 + fi + Logger "#### Running osync in file monitor mode." "NOTICE" while true; do