I have a program that I added to /etc/rc.local to have it run as soon as the server starts. The problem is that sometimes the program stops responding and I need to restart it but I can not restart the server. I can only restart the server at night but the program sometimes dies during the day.
migrated from stackoverflow.com Mar 8 '11 at 15:28
|
Instead of putting it in Then, use |
|||
|
|
|
As mentioned by Shane you'll want to create an init script to start/stop/restart the service. As far as the program not responding, you'll want to find the root cause of that first. You can also use GOD http://god.rubyforge.org/ to monitor and automatically restart the program (using your rc.local entry) Hope that helps. |
|||
|
|
|
It is possible Ubuntu already has such a facility built-in via the standard rc system, but you might Google around "ubuntu daemon health monitor" and the like. I found a program called monit which you could probably install and configure to check in on your process and restart it when it fails. |
|||
|
|
/etc/ini.d/whatever startmight do it. – chmullig Mar 8 '11 at 15:14