Nginx 的systemd风格的脚本

系统脚本可以放在/lib/systemd/system/下 ,管理员编写的脚本一般可放在/etc/systemd/system/下


[Unit]

Description=nginx 

After=network.target remote-fs.target nss-lookup.target


[Service]

Type=forking

PIDFile=/webdata/opt/local/tengine/logs/nginx.pid

ExecStart=/webdata/opt/local/tengine/sbin/nginx -c /webdata/opt/local/tengine/conf/nginx.conf

ExecReload=/bin/kill -s HUP $MAINPID

ExecStop=/bin/kill -s QUIT $MAINPID

PrivateTmp=true


[Install]

WantedBy=multi-user.target


请先 登录 后评论
  • 0 关注
  • 0 收藏,501 浏览
  • 石天 提出于 2016-11-23 02:55

相似问题