From 56010d3a0db2ba7d2abfbf584466bbef25668782 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 11 Apr 2017 13:27:58 +0200 Subject: [PATCH] Update installer from pmocr --- dev/common_install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/common_install.sh b/dev/common_install.sh index f9c632d..c3d0d10 100755 --- a/dev/common_install.sh +++ b/dev/common_install.sh @@ -12,7 +12,7 @@ PROGRAM_BINARY=$PROGRAM".sh" PROGRAM_BATCH=$PROGRAM"-batch.sh" SSH_FILTER="ssh_filter.sh" -SCRIPT_BUILD=2017032101 +SCRIPT_BUILD=2017040902 ## 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 @@ -221,9 +221,9 @@ function CopyServiceFiles { elif ([ "$init" == "initV" ] && [ -f "$SCRIPT_PATH/$SERVICE_FILE_INIT" ] && [ -d "$SERVICE_DIR_INIT" ]); then CopyFile "$SCRIPT_PATH" "$SERVICE_DIR_INIT" "$SERVICE_FILE_INIT" "755" "" "" true - QuickLogger "Created osync-srv service in [$SERVICE_DIR_INIT]." - QuickLogger "Can be activated with [service $OSYNC_SERVICE_FILE_INIT start]." - QuickLogger "Can be enabled on boot with [chkconfig $OSYNC_SERVICE_FILE_INIT on]." + QuickLogger "Created [$SERVICE_NAME] service in [$SERVICE_DIR_INIT]." + QuickLogger "Can be activated with [service $SERVICE_FILE_INIT start]." + QuickLogger "Can be enabled on boot with [chkconfig $SERVICE_FILE_INIT on]." else QuickLogger "Cannot define what init style is in use on this system. Skipping service file installation." fi @@ -265,7 +265,11 @@ function RemoveFile { function RemoveAll { RemoveFile "$BIN_DIR/$PROGRAM_BINARY" - RemoveFile "$BIN_DIR/$PROGRAM_BATCH" + + if [ "$PROGRAM" == "osync" ] || [ "$PROGRAM" == "obackup" ]; then + RemoveFile "$BIN_DIR/$PROGRAM_BATCH" + fi + if [ ! -f "$BIN_DIR/osync.sh" ] && [ ! -f "$BIN_DIR/obackup.sh" ]; then # Check if any other program requiring ssh filter is present before removal RemoveFile "$BIN_DIR/$SSH_FILTER" else