移除
并将
clash@.service 重命名为
clash.service,放置位置由
/lib/systemd/system/clash@.service 改为
/lib/systemd/user/clash.service,这样使用时只需对应用户执行
systemctl start --user clash 和
systemctl enable --user clash 即可(也可合并为
systemctl enable --now --user clash)。
这样会在用户登录的同时启动 clash,并且在用户登出后自动关闭。(如果想要登出时不自动关闭请执行
loginctl enable-linger 以启用 linger)
移除
SystemdClash/clash@.service
Line 7 in 191063c
并将
clash@.service重命名为clash.service,放置位置由/lib/systemd/system/clash@.service改为/lib/systemd/user/clash.service,这样使用时只需对应用户执行systemctl start --user clash和systemctl enable --user clash即可(也可合并为systemctl enable --now --user clash)。这样会在用户登录的同时启动 clash,并且在用户登出后自动关闭。(如果想要登出时不自动关闭请执行
loginctl enable-linger以启用 linger)