From f153daed3c7e7acd543909536b0e3fec789ec78f Mon Sep 17 00:00:00 2001 From: boypt Date: Fri, 22 Feb 2019 11:39:25 +0800 Subject: [PATCH] fix v2ray service --- src/download-v2ray.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/download-v2ray.sh b/src/download-v2ray.sh index 286cad2..ac65d9b 100644 --- a/src/download-v2ray.sh +++ b/src/download-v2ray.sh @@ -33,13 +33,12 @@ _download_v2ray_file() { _install_v2ray_service() { if [[ $systemd ]]; then - cp -f "/tmp/v2ray/systemd/v2ray.service" "/lib/systemd/system/" + install -m 644 "/usr/bin/v2ray/systemd/v2ray.service" "/lib/systemd/system/" sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service systemctl enable v2ray else apt-get install -y daemon - cp "/tmp/v2ray/systemv/v2ray" "/etc/init.d/v2ray" - chmod +x "/etc/init.d/v2ray" + install -m 755 "/usr/bin/v2ray/systemv/v2ray" "/etc/init.d/v2ray" update-rc.d -f v2ray defaults fi }