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?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Kevin
  • 173
  • 6

2 Answers2

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.

Community
  • 1
  • 1
Kevin
  • 173
  • 6
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.

juanlumn
  • 6,155
  • 2
  • 30
  • 39
RFPic
  • 1
  • 1