mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-02-04 10:11:28 +08:00
Add update flow, pidfile handling, and systemd unit
This commit is contained in:
16
systemd/clash-for-linux.service
Normal file
16
systemd/clash-for-linux.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Clash for Linux
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/clash-for-linux
|
||||
ExecStart=/bin/bash /opt/clash-for-linux/start.sh
|
||||
ExecStop=/bin/bash /opt/clash-for-linux/shutdown.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
User=root
|
||||
PIDFile=/opt/clash-for-linux/temp/clash.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user