diff --git a/init.d/nginx b/init.d/nginx index 2b0e9ad..31c901b 100755 --- a/init.d/nginx +++ b/init.d/nginx @@ -3,10 +3,14 @@ service_command='/usr/bin/nginx' service_pidfile='/run/nginx.pid' -nginx.test_config() { "$service_command" -tq; } +nginx.test_config() { "$service_command" -t "$@"; } + +conftest() { + nginx.test_config +} reload() { - nginx.test_config || { + nginx.test_config -q || { watchman.err "Nginx config test failed, not reloading." return 1 } @@ -15,7 +19,7 @@ reload() { } restart() { - nginx.test_config || { + nginx.test_config -q || { watchman.err "Nginx config test failed, not restarting." return 1 }