nginx
This commit is contained in:
parent
3916f4fac1
commit
0fb74e530c
24
init.d/nginx
Executable file
24
init.d/nginx
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env watchman
|
||||||
|
|
||||||
|
service_command='/usr/bin/nginx'
|
||||||
|
service_pidfile='/run/nginx.pid'
|
||||||
|
|
||||||
|
nginx.test_config() { "$service_command" -tq; }
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
nginx.test_config || {
|
||||||
|
watchman.err "Nginx config test failed, not reloading."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
watchman.reload
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
nginx.test_config || {
|
||||||
|
watchman.err "Nginx config test failed, not restarting."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
stop; start
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user