forked from Spark/ssm-services
conftest
This commit is contained in:
parent
3d5a93b86e
commit
0c22e184e6
10
init.d/nginx
10
init.d/nginx
@ -3,10 +3,14 @@
|
|||||||
service_command='/usr/bin/nginx'
|
service_command='/usr/bin/nginx'
|
||||||
service_pidfile='/run/nginx.pid'
|
service_pidfile='/run/nginx.pid'
|
||||||
|
|
||||||
nginx.test_config() { "$service_command" -tq; }
|
nginx.test_config() { "$service_command" -t "$@"; }
|
||||||
|
|
||||||
|
conftest() {
|
||||||
|
nginx.test_config
|
||||||
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
nginx.test_config || {
|
nginx.test_config -q || {
|
||||||
watchman.err "Nginx config test failed, not reloading."
|
watchman.err "Nginx config test failed, not reloading."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@ -15,7 +19,7 @@ reload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
nginx.test_config || {
|
nginx.test_config -q || {
|
||||||
watchman.err "Nginx config test failed, not restarting."
|
watchman.err "Nginx config test failed, not restarting."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user