Make nginx-*.postinst use invoke-rc.d.

This commit is contained in:
Michael Lustfield 2016-07-16 19:14:08 -07:00
parent a4f9f837e7
commit 1b3fa883bb
4 changed files with 7 additions and 43 deletions

5
debian/changelog vendored
View file

@ -7,8 +7,11 @@ nginx (1.10.1-2) UNRELEASED; urgency=medium
[ Michael Lustfield ]
* debian/patches/0003-*.patch:
+ Use _GNU_SOURCE on GNU/kFreeBSD (Closes: #826061)
+ Use _GNU_SOURCE on GNU/kFreeBSD. (Closes: #826061)
Thanks Steven Chamberlain for the patch.
* debian/nginx-*.postinst:
+ Make nginx-*.postinst use invoke-rc.d. (Closes: #823435)
Thanks Simon Deziel for the patch.
-- Michael Lustfield <michael@lustfield.net> Sat, 16 Jul 2016 17:24:40 -0700

View file

@ -13,20 +13,7 @@ esac
if [ -x /etc/init.d/nginx ]; then
if [ -f /run/nginx.pid ] && pidof /usr/sbin/nginx >/dev/null; then
NGX_PID=`cat /run/nginx.pid`
if kill -s USR2 $NGX_PID 2>/dev/null; then
while [ ! -s /run/nginx.pid.oldbin ] || [ ! -s /run/nginx.pid ]; do
cnt=`expr $cnt + 1`
if [ $cnt -gt 10 ]; then
kill -s KILL $NGX_PID
invoke-rc.d nginx start
exit 0
fi
sleep 1
done
NGX_OLD_PID=`cat /run/nginx.pid.oldbin`
kill -s QUIT $NGX_OLD_PID
fi
invoke-rc.d nginx upgrade || exit $?
else
invoke-rc.d nginx start || exit $?
fi

View file

@ -13,20 +13,7 @@ esac
if [ -x /etc/init.d/nginx ]; then
if [ -f /run/nginx.pid ] && pidof /usr/sbin/nginx >/dev/null; then
NGX_PID=`cat /run/nginx.pid`
if kill -s USR2 $NGX_PID 2>/dev/null; then
while [ ! -s /run/nginx.pid.oldbin ] || [ ! -s /run/nginx.pid ]; do
cnt=`expr $cnt + 1`
if [ $cnt -gt 10 ]; then
kill -s KILL $NGX_PID
invoke-rc.d nginx start
exit 0
fi
sleep 1
done
NGX_OLD_PID=`cat /run/nginx.pid.oldbin`
kill -s QUIT $NGX_OLD_PID
fi
invoke-rc.d nginx upgrade || exit $?
else
invoke-rc.d nginx start || exit $?
fi

View file

@ -13,20 +13,7 @@ esac
if [ -x /etc/init.d/nginx ]; then
if [ -f /run/nginx.pid ] && pidof /usr/sbin/nginx >/dev/null; then
NGX_PID=`cat /run/nginx.pid`
if kill -s USR2 $NGX_PID 2>/dev/null; then
while [ ! -s /run/nginx.pid.oldbin ] || [ ! -s /run/nginx.pid ]; do
cnt=`expr $cnt + 1`
if [ $cnt -gt 10 ]; then
kill -s KILL $NGX_PID
invoke-rc.d nginx start
exit 0
fi
sleep 1
done
NGX_OLD_PID=`cat /run/nginx.pid.oldbin`
kill -s QUIT $NGX_OLD_PID
fi
invoke-rc.d nginx upgrade || exit $?
else
invoke-rc.d nginx start || exit $?
fi