23 lines
435 B
Plaintext
Executable File
23 lines
435 B
Plaintext
Executable File
#!/usr/bin/env ssm
|
|
|
|
# For respawn to work, set 'daemon no' in nginx.conf
|
|
#service_respawn=on-failure
|
|
service_command='/usr/bin/nginx'
|
|
service_pidfile='/run/nginx.pid'
|
|
|
|
nginx.test_config() { "$service_command" -t "$@"; }
|
|
|
|
conftest() {
|
|
nginx.test_config
|
|
}
|
|
|
|
pre_reload() {
|
|
nginx.test_config || {
|
|
printf 'Config test failed, not reloading.\n'
|
|
}
|
|
}
|
|
|
|
upgrade() {
|
|
printf 'This script has no zero-downtime upgrade support for nginx.\n'
|
|
}
|