Systemd示例
[Unit]
Description=alarm
After=network.target nss-lookup.target
Wants=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/var/www/work_dir/
ExecStart=/var/www/work_dir/run_app
Restart=always
RestartSec=10
RestartPreventExitStatus=143 137 SIGTERM SIGKILL
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
https://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-part-two.html