diff --git a/image/nginx-passenger.sh b/image/nginx-passenger.sh index 42fda64e..0d60e84e 100755 --- a/image/nginx-passenger.sh +++ b/image/nginx-passenger.sh @@ -48,6 +48,10 @@ run touch /etc/service/nginx/down run mkdir /etc/service/nginx-log-forwarder run cp /pd_build/runit/nginx-log-forwarder /etc/service/nginx-log-forwarder/run +## Use SIGQUIT instead of SIGTERM to shutdown nginx +run mkdir -p /etc/service/nginx/control/ +run cp /pd_build/runit/nginx-term /etc/service/nginx/control/t + run mkdir /var/run/passenger-instreg run sed -i 's|invoke-rc.d nginx rotate|sv 1 nginx|' /etc/logrotate.d/nginx diff --git a/image/runit/nginx-term b/image/runit/nginx-term new file mode 100755 index 00000000..cd590dc4 --- /dev/null +++ b/image/runit/nginx-term @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +sv q nginx