Commit 8a00c1e6 authored by Bernd Zeimetz's avatar Bernd Zeimetz

Closes: #538006

* Ensure that pgbounce stops, even if clients are connected.
Thanks to Cyril Bouthors for the patch. Closes: #523066
parent a3dfadda
......@@ -3,9 +3,11 @@ pgbouncer (1.3.1-1) unstable; urgency=low
* New upstream release.
* debian/init: Use reload instead of restart when force-reload
was called, thanks to Peter Eisentraut for the bug report.
(Closes: #538006)
Closes: #538006
* Ensure that pgbounce stops, even if clients are connected.
Thanks to Cyril Bouthors for the patch. Closes: #523066
-- Bernd Zeimetz <bzed@debian.org> Thu, 23 Jul 2009 16:02:00 +0200
-- Bernd Zeimetz <bzed@debian.org> Thu, 23 Jul 2009 16:06:06 +0200
pgbouncer (1.3-1) unstable; urgency=low
......
......@@ -43,14 +43,23 @@ d_start() {
fi
}
d_stop() {
SIG=${1:-INT}
killproc -p $PIDFILE $DAEMON $SIG
status=$?
[ $status -eq 0 ] || [ $status -eq 3 ]
return $?
d_reload() {
is_running || return 0
killproc -p $PIDFILE $DAEMON HUP
}
d_stop() {
SIGS='INT TERM KILL'
for sig in $SIGS
do
is_running || return 0
killproc -p $PIDFILE $DAEMON $sig
sleep 1
done
}
case "$1" in
start)
......@@ -79,7 +88,8 @@ case "$1" in
;;
restart)
log_daemon_msg "Restarting pgbouncer" pgbouncer
d_stop && sleep 1 && d_start
d_stop
d_start
log_end_msg $?
;;
try-restart)
......@@ -92,7 +102,7 @@ case "$1" in
reload|force-reload)
if is_running; then
log_daemon_msg "Reloading configuration" pgbouncer
d_stop -HUP
d_reload
log_end_msg $?
else
log_failure_msg "pgbouncer is not running."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment