Update systemd unit files every time the script is executed
脚本安装 systemd unit files 的行为很快会改为从最新的 v2ray-core release 中取得文件。 考虑到这些文件未来会有随 v2ray-core 新版本发布而更新的可能,所以提前做出这样的调整。pull/81/head
parent
5d471592fd
commit
2235098bc6
|
@ -380,9 +380,7 @@ install_v2ray() {
|
|||
}
|
||||
|
||||
install_startup_service_file() {
|
||||
if [[ ! -f '/etc/systemd/system/v2ray.service' ]]; then
|
||||
"mkdir" -p "${TMP_DIRECTORY}/systemd/system/"
|
||||
install_software curl
|
||||
cat > "${TMP_DIRECTORY}/systemd/system/v2ray.service" <<-EOF
|
||||
[Unit]
|
||||
Description=V2Ray Service
|
||||
|
@ -420,7 +418,6 @@ EOF
|
|||
install -m 644 "${TMP_DIRECTORY}/systemd/system/v2ray.service" /etc/systemd/system/v2ray.service
|
||||
install -m 644 "${TMP_DIRECTORY}/systemd/system/v2ray@.service" /etc/systemd/system/v2ray@.service
|
||||
SYSTEMD='1'
|
||||
fi
|
||||
}
|
||||
|
||||
start_v2ray() {
|
||||
|
|
Loading…
Reference in New Issue