environment/recipes/nginx/nginx.service.erb
Artur Gurgul1 5737f5ee50 save
2025-08-10 11:06:53 +02:00

23 lines
480 B
Text

sudo tee /etc/systemd/system/nginx-custom.service >/dev/null <<'EOF'
[Unit]
Description=nginx (custom prefix)
After=network.target
[Service]
Type=forking
PIDFile=/pkg/nginx/run/nginx.pid
ExecStart=/pkg/nginx/sbin/nginx
ExecReload=/pkg/nginx/sbin/nginx -s reload
ExecStop=/pkg/nginx/sbin/nginx -s quit
TimeoutStopSec=5
#User=nginx
#Group=nginx
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# sudo systemctl daemon-reload
# sudo systemctl enable --now nginx-custom