Bug#609457: restart function in Init script does not work

2013-02-28 Thread Leo Breebaart
I have to report/confirm that (a) this bug still exists, both in
squeeze and wheezy, and (b) the patch that was supplied by Sven
in the original 2011 message indeed fixes the issue. It would be
really nice if this could be incorporated into the package
proper.

-- 
Leo Breebaart breeba...@stcorp.nl


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#609457: restart function in Init script does not work

2011-05-20 Thread Herman van Rink
I ran into the same problem, the suggested change fixed the issue.

-- 
Met vriendelijke groet / Regards,

Herman van Rink 
Initfour websolutions





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#609457: restart function in Init script does not work

2011-01-09 Thread Sven Wick
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 \
+