2017-07-13 13:09:42 +00:00
|
|
|
#!/usr/bin/env ssm
|
2014-07-26 09:33:26 +00:00
|
|
|
|
2015-09-15 09:28:17 +00:00
|
|
|
# For respawn to work, set 'daemon no' in nginx.conf
|
|
|
|
#service_respawn='true'
|
2014-07-26 09:33:26 +00:00
|
|
|
service_command='/usr/bin/nginx'
|
|
|
|
service_pidfile='/run/nginx.pid'
|
|
|
|
|
2015-09-15 09:22:37 +00:00
|
|
|
nginx.test_config() { "$service_command" -t "$@"; }
|
|
|
|
|
|
|
|
conftest() {
|
|
|
|
nginx.test_config
|
|
|
|
}
|
2014-07-26 09:33:26 +00:00
|
|
|
|
2017-07-13 13:09:42 +00:00
|
|
|
pre_reload() {
|
|
|
|
nginx.test_config || {
|
|
|
|
printf 'Config test failed, not reloading.\n'
|
|
|
|
}
|
2014-07-26 09:33:26 +00:00
|
|
|
}
|
|
|
|
|
2014-09-23 22:47:40 +00:00
|
|
|
upgrade() {
|
2017-07-13 13:09:42 +00:00
|
|
|
printf 'This script has no zero-downtime upgrade support for nginx.\n'
|
2014-09-23 22:47:40 +00:00
|
|
|
}
|