博客后台使用service代替定时重启
添加到了service,自动启动,重启:
[Unit]
Description=YadiHttpd-Server
[Service]
Type=forking
ExecStart=/home/pi/yadihttpd/yadihttpd 8123 /home/pi/www /home/pi/yadihttpdlog
ExecStop=kill -9 $(pidof yadihttpd)
ExecReload=kill -9 $(pidof yadihttpd) && /home/pi/yadihttpd/yadihttpd 8123 /home/pi/www /home/pi/yadihttpdlog
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target