| [Unit] |
| Description=The NGINX HTTP and reverse proxy server |
| After=network.target |
| |
| [Service] |
| Type=forking |
| SyslogIdentifier=nginx |
| ExecStartPre=/usr/bin/env gen-cert.sh |
| ExecStartPre=-/usr/bin/env mkdir /var/volatile/nginx/ |
| ExecStartPre=/usr/bin/env nginx -t -p /var/volatile/nginx |
| ExecStart=/usr/bin/env nginx -p /var/volatile/nginx |
| ExecReload=/usr/bin/env kill -s HUP $MAINPID |
| ExecStop=/usr/bin/env kill -s QUIT $MAINPID |
| PrivateTmp=true |
| # First time on system takes longer for initial setup so |
| # give double normal timeout |
| TimeoutStartSec=180 |
| |
| [Install] |
| WantedBy={SYSTEMD_DEFAULT_TARGET} |