mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 01:17:30 -05:00
installInitScript optimize
Should not install systemV init script when we have systemd
This commit is contained in:
parent
0fd0c374c1
commit
808ca5d473
@ -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' && \
|
||||
|
Loading…
Reference in New Issue
Block a user