There is an example of mysqld.service, http://superuser.com/a/384525/577295
I need nginx.service,so I imitate it and write like this:
[Unit]
Description=Nginx Server
After=network.target
[Service]
ExecStart=/usr/local/nginx/sbin/nginx --defaults-file=/usr/local/nginx/conf/nginx.conf --socket=/var/run/nginx/nginx.sock
User=nginx
Group=nginx
WorkingDirectory=/usr
[Install]
WantedBy=multi-user.target
but I'm not sure whether it's right or not.
برچسب:
نویسنده: استخدام کار