From ea58a65954a554625f9d088ae972cebe321b3e03 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 7 Feb 2017 22:10:24 +0100 Subject: [PATCH] Quick fix for BSD service files --- dev/common_install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/common_install.sh b/dev/common_install.sh index 024fe2a..5c47924 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=2017020702 +SCRIPT_BUILD=2017020703 ## 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 @@ -210,12 +210,14 @@ function CopyServiceFiles { QuickLogger "Can be activated with [systemctl start SERVICE_NAME@instance.conf] where instance.conf is the name of the config file in $CONF_DIR." QuickLogger "Can be enabled on boot with [systemctl enable $SERVICE_NAME@instance.conf]." QuickLogger "In userland, active with [systemctl --user start $SERVICE_NAME@instance.conf]." - elif ([ "$init" == "initV" ] && [ -f "$SCRIPT_PATH/$SERVICE_FILE_INIT" ]); then + 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]." + else + QuickLogger "Cannot define what init style is in use on this system. Skipping service file installation." fi }