From 5e6e5c0c6ad99a9b809f2ab9fe8d8de855816218 Mon Sep 17 00:00:00 2001 From: kirin10000 <57820613+kirin10000@users.noreply.github.com> Date: Sun, 20 Dec 2020 00:05:55 +0800 Subject: [PATCH] Optimize service files (#6) --- install-release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install-release.sh b/install-release.sh index 705df37..f6e6255 100644 --- a/install-release.sh +++ b/install-release.sh @@ -393,6 +393,8 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/usr/local/bin/xray run -config /usr/local/etc/xray/config.json +LimitNPROC=10000 +LimitNOFILE=1000000 [Install] WantedBy=multi-user.target @@ -409,10 +411,13 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/usr/local/bin/xray run -config /usr/local/etc/xray/%i.json +LimitNPROC=10000 +LimitNOFILE=1000000 [Install] WantedBy=multi-user.target EOF + chmod 644 /etc/systemd/system/xray.service /etc/systemd/system/xray@.service if [[ -n "$JSONS_PATH" ]]; then "rm" '/etc/systemd/system/xray.service.d/10-donot_touch_single_conf.conf' \ '/etc/systemd/system/xray@.service.d/10-donot_touch_single_conf.conf'