New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add init.d to run Supervisor at startup #4

Closed
jpadilla opened this Issue Jul 12, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@jpadilla
Contributor

jpadilla commented Jul 12, 2011

Supervisor is not running at startup. You can configure an init.d script to do this.

sudo vi /etc/init.d/supervisord

Add the following:

# Supervisord auto-start
#
# description: Auto-starts supervisord
# processname: supervisord
# pidfile: /var/run/supervisord.pid

SUPERVISORD=/usr/local/bin/supervisord
SUPERVISORCTL=/usr/local/bin/supervisorctl

case $1 in
start)
        echo -n "Starting supervisord: "
        $SUPERVISORD
        echo
        ;;
stop)
        echo -n "Stopping supervisord: "
        $SUPERVISORCTL shutdown
        echo
        ;;
restart)
        echo -n "Stopping supervisord: "
        $SUPERVISORCTL shutdown
        echo
        echo -n "Starting supervisord: "
        $SUPERVISORD
        echo
        ;;
esac

And then...

sudo chmod +x /etc/init.d/supervisord
sudo update-rc.d supervisord defaults
sudo /etc/init.d/supervisord start

Obviously, this should probably go as added actions on cookbook.py and the init.d script as a template

@gcollazo

This comment has been minimized.

Show comment
Hide comment
@gcollazo

gcollazo Jul 12, 2011

Owner

Feel free to make the changes in your fork. If they work I will merge them to master.

Owner

gcollazo commented Jul 12, 2011

Feel free to make the changes in your fork. If they work I will merge them to master.

@gcollazo gcollazo closed this Jul 15, 2011

@gcollazo

This comment has been minimized.

Show comment
Hide comment
@gcollazo

gcollazo Jul 15, 2011

Owner

Just pushed an update with this!

Owner

gcollazo commented Jul 15, 2011

Just pushed an update with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment