Open fzxiehui opened 2 years ago
/etc/systemd/system/clash.service
[Unit]
Description=Clash Service
After=network.target
[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/home/pi/clash/clash -f /home/pi/clash/config.yaml
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
sudo systemctl enable clash.service sudo systemctl start clash.service
[Unit]
Description=Clash Service
After=network.target
[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/home/pi/clash/clash -f /home/pi/clash/config.yaml -d /home/pi/clash
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
sudo journalctl -u clash.service | tail -n 20
sudo systemctl daemon-reload
sudo systemctl status clash.service