From 630e7fed4043071b740c333c061ff29d5c6ef190 Mon Sep 17 00:00:00 2001 From: zouquan741 Date: Thu, 5 Mar 2020 21:09:45 +0800 Subject: [PATCH] installInitScript optimize Should not install systemV init script when we have systemd --- release/install-release.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release/install-release.sh b/release/install-release.sh index 0df1a095..e5c50e85 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -324,9 +324,11 @@ installV2Ray(){ installInitScript(){ - if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ ! -f "/etc/systemd/system/v2ray.service" && ! -f "/lib/systemd/system/v2ray.service" ]]; then - unzip -oj "$1" "$2systemd/v2ray.service" -d '/etc/systemd/system' && \ - systemctl enable v2ray.service + if [[ -n "${SYSTEMCTL_CMD}" ]]; then + if [[ ! -f "/etc/systemd/system/v2ray.service" && ! -f "/lib/systemd/system/v2ray.service" ]]; then + unzip -oj "$1" "$2systemd/v2ray.service" -d '/etc/systemd/system' && \ + systemctl enable v2ray.service + fi elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/v2ray" ]]; then installSoftware 'daemon' && \ unzip -oj "$1" "$2systemv/v2ray" -d '/etc/init.d' && \