From 388a31d3d02231662c364a94dc01d7a18b0eb27e Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Wed, 1 Apr 2020 22:05:20 +0800 Subject: [PATCH] Prevent abnormal exit --- systemd/system/v2ray.service | 1 + systemd/system/v2ray@.service | 1 + 2 files changed, 2 insertions(+) diff --git a/systemd/system/v2ray.service b/systemd/system/v2ray.service index 3cbb4bc..c86a386 100644 --- a/systemd/system/v2ray.service +++ b/systemd/system/v2ray.service @@ -9,6 +9,7 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/usr/local/bin/v2ray -confdir /usr/local/etc/v2ray/ +Restart=on-failure [Install] WantedBy=multi-user.target diff --git a/systemd/system/v2ray@.service b/systemd/system/v2ray@.service index 0473923..dd0a46d 100644 --- a/systemd/system/v2ray@.service +++ b/systemd/system/v2ray@.service @@ -9,6 +9,7 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/%i.json +Restart=on-failure [Install] WantedBy=multi-user.target