Package: supervisor
Version: 3.0a8-1
Severity: important
Tags: patch
supervisord does not restart when invoked via
/etc/init.d/supervisor restart
Its PID stays the same.
The start-stop-daemon does not find running instances
and so some conditionals in the script don't work.
Another side-effect is, that the pidfile gets removed
when invoking the script with start and supervisord is already running.
I included a patch to fix all this
--- /etc/init.d/supervisor 2009-05-05 10:35:10.0 +0200
+++ /etc/init.d/supervisor.fix 2011-01-09 16:58:28.0 +0100
@@ -91,7 +91,7 @@
start)
echo -n Starting $DESC:
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --exec $DAEMON -- $DAEMON_OPTS
+--startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
echo $NAME.
@@ -132,18 +132,17 @@
# just the same as restart except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
- start-stop-daemon --stop --test --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON \
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
+ --startas $DAEMON \
$0 restart \
|| exit 0
;;
restart)
echo -n Restarting $DESC:
- start-stop-daemon --stop --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n $DODTIME ] sleep $DODTIME
- start-stop-daemon --start --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+--startas $DAEMON -- $DAEMON_OPTS
echo $NAME.
;;
status)
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages supervisor depends on:
ii python 2.6.6-3+squeeze4 interactive high-level object-orie
ii python-medusa 0.5.4+clean-2Framework for implementing asynchr
ii python-meld30.6.5-3 An HTML/XML templating system for
ii python-pkg-resources0.6.14-4 Package Discovery and Resource Acc
ii python-support 1.0.10 automated rebuilding support for P
supervisor recommends no packages.
supervisor suggests no packages.
-- no debconf information
--- /etc/init.d/supervisor 2009-05-05 10:35:10.0 +0200
+++ /etc/init.d/supervisor.fix 2011-01-09 16:58:28.0 +0100
@@ -91,7 +91,7 @@
start)
echo -n Starting $DESC:
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --exec $DAEMON -- $DAEMON_OPTS
+--startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
echo $NAME.
@@ -132,18 +132,17 @@
# just the same as restart except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
- start-stop-daemon --stop --test --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON \
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
+ --startas $DAEMON \
$0 restart \
|| exit 0
;;
restart)
echo -n Restarting $DESC:
- start-stop-daemon --stop --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n $DODTIME ] sleep $DODTIME
- start-stop-daemon --start --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+--startas $DAEMON -- $DAEMON_OPTS
echo $NAME.
;;
status)
--- /etc/init.d/supervisor 2009-05-05 10:35:10.0 +0200
+++ /etc/init.d/supervisor.fix 2011-01-09 16:58:28.0 +0100
@@ -91,7 +91,7 @@
start)
echo -n Starting $DESC:
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --exec $DAEMON -- $DAEMON_OPTS
+--startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
echo $NAME.
@@ -132,18 +132,17 @@
# just the same as restart except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
- start-stop-daemon --stop --test --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON \
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
+