【Linux管理】利用systemd开机执行命令
我自己记着玩的,以后有机会详细写配置
参考:http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html
[Unit]
Description=shadowsocks-rss
Documentation=
After=network.target remote-fs.target nss-lookup.target
[Service]
WorkingDirectory=/home/××××/code/shadowsocksr/shadowsocks/
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/python local.py -d start
ExecStop=/usr/bin/python local.py -d stop
ExecReload=/usr/bin/python local.py -d restart
[Install]
WantedBy=multi-user.target
载入配置
sudo systemctl enable ssr.service