From 0e3894ff59f341cbe1fbea0c16f496927fdaa34f Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 10 Feb 2017 11:28:43 +0100 Subject: [PATCH] Installer now skips ssh_filter removal if needed --- dev/common_install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev/common_install.sh b/dev/common_install.sh index 6cf9d46..63d3b87 100755 --- a/dev/common_install.sh +++ b/dev/common_install.sh @@ -8,7 +8,7 @@ PROGRAM_BINARY=$PROGRAM".sh" PROGRAM_BATCH=$PROGRAM"-batch.sh" SSH_FILTER="ssh_filter.sh" -SCRIPT_BUILD=2017020802 +SCRIPT_BUILD=2017021001 ## 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 @@ -258,7 +258,11 @@ function RemoveFile { function RemoveAll { RemoveFile "$BIN_DIR/$PROGRAM_BINARY" RemoveFile "$BIN_DIR/$PROGRAM_BATCH" - RemoveFile "$BIN_DIR/$SSH_FILTER" + if [ ! -f "$BIN_DIR/osync.sh" ] && [ -f "$BIN_DIR/obackup.sh" ]; then + RemoveFile "$BIN_DIR/$SSH_FILTER" + else + QuickLogger "Skipping removal of [$BIN_DIR/$SSH_FILTER] because other programs present that need it." + fi RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM" RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_SYSTEM" RemoveFile "$SERVICE_DIR_INIT/$SERVICE_FILE_INIT"