Use systemd boot from Kai achieve Clash

Use systemd boot from Kai achieve Clash

Clash of the service is first prepared script, and save it as /etc/systemd/system/clash.service. It reads as follows:

[Unit]
Description=Clash service
After=network.target

[Service]
Type=simple
User=skylee
ExecStart=/usr/bin/clash
Restart=on-failure
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

Which User=followed by the contents of your own user name.

Clash of the boot entry settings, check status, after the service starts successfully, according to the information agency agreement to set their own client type and port:

sudo systemctl daemon-reload
sudo systemctl enable clash
sudo systemctl start clash
sudo systemctl status clash

Guess you like

Origin www.cnblogs.com/skylee03/p/12222767.html