systemd管理进程

systemd很强大的管理工具,这里简单用来管理一个进程:

[Unit]
Description=Imges Compress Server

[Service]
Type=simple
ExecStart=/opt/app/php7/bin/php /data/www/imgserver/artisan queue:work redis --queue=imgcompress --env=pro
#ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=false
User=www
Group=www
Restart=always

[Install]
WantedBy=multi-user.target

posted @ 2017-07-04 11:07  行知散人  阅读(702)  评论(0编辑  收藏  举报