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 }