#vi /etc/systemd/system/xxx.service
[Unit]
Description=startup script test [Service]
Type=simple
ExecStart=/usr/local/bin/xxx/xxx.sh
Restart=always
# RestartSec=
# TimeoutSec= [Install]
WantedBy=multi-user.target
#systemctl enable xxx.service
参考:http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html