+19
-5
@@ -1,8 +1,22 @@
|
||||
#!/usr/bin/env ssm
|
||||
|
||||
service_respawn = on-failure
|
||||
service_command = /usr/bin/nginx
|
||||
service_pidfile = /run/nginx.pid
|
||||
# nginx web server.
|
||||
#
|
||||
# nginx daemonizes itself (the parent returns after handing off to
|
||||
# workers), so we don't wait for the process to exit — we wait for the
|
||||
# port instead.
|
||||
|
||||
# Do not reload the service if the config test fails.
|
||||
pre_reload() { "$service_command" -t "$@"; }
|
||||
service_respawn = on-failure
|
||||
service_command = /usr/sbin/nginx
|
||||
service_pidfile = /run/nginx.pid
|
||||
service_pidfile_timeout = 10
|
||||
|
||||
# ngs sometimes takes a moment to bind; poll until the socket answers.
|
||||
ready() {
|
||||
(exec 3<>/dev/tcp/127.0.0.1/80) 2>/dev/null
|
||||
}
|
||||
|
||||
# Do not send the reload signal if the config doesn't parse.
|
||||
pre_reload() {
|
||||
"$service_command" -t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user