Auto-restart NGINX on failure

This commit is contained in:
George Robinson 2016-05-25 11:57:25 +01:00
parent 7f5d36603d
commit 6d41a590f8

View File

@ -9,7 +9,9 @@ ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx ExecStart=/usr/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
RestartSec=10s
PrivateTmp=true PrivateTmp=true
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target