ssm-services/init.d/nginx
2015-11-01 15:30:10 +03:00

26 lines
489 B
Plaintext
Executable File

#!/usr/bin/env watchman
# For respawn to work, set 'daemon no' in nginx.conf
#service_respawn='true'
service_command='/usr/bin/nginx'
service_pidfile='/run/nginx.pid'
nginx.test_config() { "$service_command" -t "$@"; }
conftest() {
nginx.test_config
}
reload() {
if nginx.test_config -q; then
watchman.reload
else
watchman.err "Nginx config test failed, not reloading."
return 1
fi
}
upgrade() {
watchman.msg "This script has no zero-downtime upgrade support for nginx."
}