Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicorn init script - not starting at boot

I'm very new to system administration and have no idea how init.d works. So maybe I'm doing something wrong here.

I'm trying to start unicorn on boot, but somehow it just fails to start everytime. I'm able to manually do a start/stop/restart by simply service app_name start. Can't seem to understand why unicorn doesn't start at boot if manual starting stopping of service works. Some user permission issue maybe ??

My unicorn init script and the unicorn config files are available here https://gist.github.com/1956543

I'm setting up a development environment on Ubuntu 11.1 running inside a VM.

UPDATE - Could it be possible because of the VM ? I'm currently sharing the entire codebase (folder) with the VM, which also happens to contain the unicorn config needed to start unicorn.

Any help would be greatly appreciated !

Thanks

like image 532
hashpipe Avatar asked Jun 14 '26 15:06

hashpipe


1 Answers

To get Unicorn to run when your system boots, you need to associate the init.d script with the default set of "runlevels", which are the modes that Ubuntu enters as it boots.

There are several different runlevels, but you probably just want the default set. To install Unicorn here, run:

sudo update-rc.d <your service name> defaults

For more information, check out the update-rc.d man page.

like image 141
Paul Rosania Avatar answered Jun 16 '26 07:06

Paul Rosania



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!