24 lines
480 B
Text
24 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
|
||
|
|
|