Via my host I have SSH access and a control panel. I installed Rails via SSH on a light weight server. I want to reboot the server when it goes down. I think I need to start it manually since I want to start two servers which run on different versions of Ruby.
I was wondering if I can use the "Cronjob" area on my control panel for this, and if so, what command I need.
Via SSH I would start the server as follows:
cd [app1path] bundle exec thin -C /etc/thin/app2.yml start cd [app2path] bundle exec thin -C /etc/thin/app2.yml start
It is important that the steps are executed in sequence, since they seem to conflict with each other (running them as a service from
init.d only starts one, strangely enough placing a
sleep 60 in one of the two does not make a diffrence, but anyway).
Placing the code below in my control panel does not seem to do anything:
@reboot [app1path; bundle exec thin -C /etc/thin/app1.yml start; cd [app2path]; bundle exec thin -C /etc/thin/app2.yml start
What would work? I would be grateful for some tips and guidance.