Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I followed this guide to install supervisor on Debian 6.06.

EDIT:

I can now get supervisor to stop, but cannot get it to start when I'm not using sudo.

/etc/init.d/supervisord ->

#! /bin/bash -e

SUPERVISORD=/usr/local/bin/supervisord
PIDFILE=/var/run/supervisor/supervisord.pid
OPTS="-c /etc/supervisord.conf"
NAME=supervisord

test -x $SUPERVISORD || exit 0

. /lib/lsb/init-functions

export PATH="${PATH:+$PATH:}/usr/local/bin:/usr/sbin:/sbin"

case "$1" in
  start)
    log_begin_msg "Starting Supervisor daemon manager..."
    start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $SUPERVISORD
-- $OPTS || log_end_msg 1
    log_end_msg 0
    ;;
  stop)
    log_begin_msg "Stopping Supervisor daemon manager..."
    start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE || log_end_msg
1
    log_end_msg 0
    ;;

  restart|reload|force-reload)
    log_begin_msg "Restarting Supervisor daemon manager..."
    start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $SUPERVISORD --
$OPTS || log_end_msg
    log_end_msg 0
    ;;

  *)
    log_success_msg "Usage: /etc/init.d/supervisor
{start|stop|reload|force-reload|restart}"
    exit 1
esac

exit 0

Section of supervisord.conf ->

[program:betawww]
command=python app.py -dev -nohup 8500
numprocs=1
directory=/var/lib/jenkins/workspace/betawww
stdout_logfile=/var/lib/jenkins/workspace/betalog.log
autostart=true
autorestart=true
user=admin
share|improve this question
    
Does the correct pid exist in the PIDFILE? I've seen similar behavior when an outdated entry exists. It should match the pid of your pa aux listing. –  Tim Brigham Feb 16 '13 at 3:29
    
Did you try apt-get install supervisor and the /etc/init.d/supervisor it provides? If you still can't get the init script to stop all the processes, try running supervisorctl stop all. Maybe you will see an error message saying why it can't stop (like one of the processes it is controlling won't exit). Also check the logs in /var/log. –  Anton Cohen Feb 16 '13 at 3:30
    
How are you trying to stop it without using sudo? –  mgorven Feb 19 '13 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.