-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
[Unit] | ||
Description=mihomo Daemon, Another Clash Kernel. | ||
After=network.target NetworkManager.service systemd-networkd.service iwd.service | ||
Documentation=https://wiki.metacubex.one | ||
After=network.target nss-lookup.target network-online.target | ||
|
||
[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 2s | ||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH | ||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH | ||
ExecStart=/usr/bin/mihomo -d /etc/mihomo | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Restart=on-failure | ||
RestartSec=10 | ||
LimitNOFILE=infinity | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=mihomo Daemon, Another Clash Kernel. | ||
Documentation=https://wiki.metacubex.one | ||
After=network.target nss-lookup.target network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH | ||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH | ||
ExecStart=/usr/bin/mihomo -d /etc/mihomo | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Restart=on-failure | ||
RestartSec=10 | ||
LimitNOFILE=infinity | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters