fix: simple the systemd unit file.

This commit is contained in:
libm committed 2025-03-01 16:41:26 +08:00
1 parent e6d79215e7
commit 96dc8a7f11
1 file changed
-7
-7
View File
@@ -37,18 +37,11 @@ _merge_config_restart
cat <<EOF >/etc/systemd/system/clash.service
[Unit]
Description=$(basename "$BIN_KERNEL") Daemon, A[nother] Clash Kernel.
After=network.target NetworkManager.service systemd-networkd.service iwd.service
[Service]
Type=simple
LimitNPROC=500
LimitNOFILE=1000000
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_TIME CAP_SYS_PTRACE CAP_DAC_READ_SEARCH CAP_DAC_OVERRIDE
Restart=always
ExecStartPre=/usr/bin/sleep 1s
ExecStart=${BIN_KERNEL} -d ${CLASH_BASE_DIR} -f ${CLASH_CONFIG_RUNTIME}
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target