更新systemd.service示例

This commit is contained in:
2024-06-14 14:12:00 +00:00
committed by cloud-init created default user
parent 1ffa3da357
commit 170ea1e86a
5 changed files with 19 additions and 14 deletions

View File

@@ -1,15 +1,16 @@
[Unit]
Description=nginx
After=network.target
Description=Nginx
Documentation=https://nginx.org
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=forking
Group=root
User=root
ExecStart=/opt/nginx/1.26.0/sbin/nginx
ExecReload=/opt/nginx/1.26.0/sbin/nginx -s reload
ExecStop=/opt/nginx/1.26.0/sbin/nginx -s stop
PrivateTmp=true
Restart=always
PrivateTmp=true
[Install]
WantedBy=multi-user.target