Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisor doesn't start on startup on Ubuntu 16.04 [closed]

I installed Supervisor on Ubuntu 16.04 with the command:

sudo apt-get install supervisor

Supervisor 3.2.0-2 successfully installed and works if I run it with the command:

sudo service supervisor start

But after reboot it doesn't start automatically. There is an init script in the init.d directory and it runs supervisor as well:

sudo /etc/init.d/supervisor start

I'd tried to add this init script to startup:

sudo update-rc.d supervisor defaults

After that I checked the /etc/rc*.d directories and there are symlinks like:

/etc/rc0.d/@K02supervisor
/etc/rc1.d/@K02supervisor
/etc/rc2.d/@S01supervisor
/etc/rc3.d/@S01supervisor
/etc/rc4.d/@S01supervisor
/etc/rc5.d/@S01supervisor
/etc/rc6.d/@K02supervisor

But supervisor doesn't start at startup. How can I start it every time after server reboot?

like image 314
Dmitry Akinin Avatar asked Jul 24 '16 12:07

Dmitry Akinin


1 Answers

You need to execute the command for starting a service at system up. For systemd on Ubuntu 16.04, this would be:

sudo systemctl enable supervisor

Also your command to start the service should be updated to:

sudo systemctl start supervisor
like image 54
Matt Schuchard Avatar answered Oct 19 '22 18:10

Matt Schuchard