Supervisor won't automatically startup when Ubuntu Server is booted
Asked Answered
P

2

5

I'm working on beantalkd and supervisord for my Laravel project with homestead vm. Everytime i vagrant up the homestead vm, the supervisord does not start. I have to manually type below for it to run:

sudo service supervisor start

The version i'm running on is 3.0b2-1. I have also installed rcconf to check which service is started automatically at boot time and supervisor is checked as well.

Another thing that i tried is running crontab to try to start the service. Below is the crontab script i wrote:

@reboot root /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
* * * * * php /home/vagrant/projects/llpm/artisan scheduled:run 1>> /dev/null 2>&1 --env=local

Still it won't automatically start at reboot. Anyone have any solution?

Peregrine answered 12/9, 2015 at 10:50 Comment(0)
P
12

I've found the answer from here.

Somehow, it's caused by vagrant. So what i did is added this line below to Homestead/scripts/homestead.rb:

config.vm.provision "shell", inline: "service supervisor restart", run: "always"

Vagrant up and supervisor is booted up as well.

Peregrine answered 13/9, 2015 at 13:45 Comment(0)
L
0

I would use: supervisord -c '/etc/supervisord.conf' in place of: /usr/bin/supervisord -c /etc/supervisor/supervisord.conf which points to a config file that supervisor does not use (/etc/supervisor/supervisord.conf). I hope it helps.

Linguini answered 4/3, 2019 at 13:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.