Merge pull request #2313 from zouquan741/master

修复安装脚本添加自启动时报错的问题
pull/2374/head
Kslr 2020-03-24 19:26:20 +08:00 committed by GitHub
commit e6947de1bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -324,9 +324,11 @@ installV2Ray(){
installInitScript(){ installInitScript(){
if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ ! -f "/etc/systemd/system/v2ray.service" && ! -f "/lib/systemd/system/v2ray.service" ]]; then if [[ -n "${SYSTEMCTL_CMD}" ]]; then
unzip -oj "$1" "$2systemd/v2ray.service" -d '/etc/systemd/system' && \ if [[ ! -f "/etc/systemd/system/v2ray.service" && ! -f "/lib/systemd/system/v2ray.service" ]]; then
systemctl enable v2ray.service 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 elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/v2ray" ]]; then
installSoftware 'daemon' && \ installSoftware 'daemon' && \
unzip -oj "$1" "$2systemv/v2ray" -d '/etc/init.d' && \ unzip -oj "$1" "$2systemv/v2ray" -d '/etc/init.d' && \