I have installed gerrit on a remote ubuntu server. Now I would like it to automatically start when the server reboots. I am trying to follow this:
http://gerrit-documentation.googlecode.com/svn/Documentation/2.3/install.html#rc_d
which is a two-liner:
sudo ln -snf `pwd`/home/gerrit2/gerrit_application/bin/gerrit.sh /etc/init.d/gerrit.sh
sudo ln -snf ../init.d/gerrit.sh /etc/rc3.d/S90gerrit
I have verified that both files are created. But when I reboot the application its not started. I still have to manually start it with:
root@mm11:/home/gerrit2/gerrit_application/bin# ./gerrit.sh start
How do I debug/fix this?
I have also tried with:
sudo ln -snf /home/gerrit2/gerrit_application/bin/gerrit.sh /etc/init.d/gerrit
sudo update-rc.d gerrit defaults
Which gives:
root@mm11:/home/gerrit2# update-rc.d gerrit defaults
Adding system startup for /etc/init.d/gerrit ...
/etc/rc0.d/K20gerrit -> ../init.d/gerrit
/etc/rc1.d/K20gerrit -> ../init.d/gerrit
/etc/rc6.d/K20gerrit -> ../init.d/gerrit
/etc/rc2.d/S20gerrit -> ../init.d/gerrit
/etc/rc3.d/S20gerrit -> ../init.d/gerrit
/etc/rc4.d/S20gerrit -> ../init.d/gerrit
/etc/rc5.d/S20gerrit -> ../init.d/gerrit