From 4f6d256e11e5a996b75deb1d67633bed02819c00 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Mon, 30 Mar 2020 18:58:52 +0800 Subject: [PATCH] Revise the contents of the startup service file --- systemd/system/v2ray.service | 7 +++---- systemd/system/v2ray@.service | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/systemd/system/v2ray.service b/systemd/system/v2ray.service index 9060eec..dcb877e 100644 --- a/systemd/system/v2ray.service +++ b/systemd/system/v2ray.service @@ -1,13 +1,12 @@ [Unit] Description=V2Ray Service -After=network-online.target -Wants=network-online.target +After=network.target network-online.target nss-lookup.target [Service] Type=simple User=nobody -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE ExecStart=/usr/local/bin/v2ray -confdir /usr/local/etc/v2ray/ [Install] diff --git a/systemd/system/v2ray@.service b/systemd/system/v2ray@.service index 99a2b62..2ffc8e2 100644 --- a/systemd/system/v2ray@.service +++ b/systemd/system/v2ray@.service @@ -1,13 +1,12 @@ [Unit] Description=V2Ray Service -After=network-online.target -Wants=network-online.target +After=network.target network-online.target nss-lookup.target [Service] Type=simple User=nobody -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW -CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/%i.json [Install]