E
E
ex0rcist2016-01-09 14:13:35
linux
ex0rcist, 2016-01-09 14:13:35

How to organize the restart of the rails stack when the physical server is rebooted?

There are projects in production, managed through capistrano. Accordingly, capistrano does its dirty work, like creating folders for releases, managing PID files, etc.
Is there an easy way to mimic the capistrano command on server reboot to bring up all the necessary stack, and not bother with init.d scripts? Plus, it seems like init.d is executed as root, with all the consequences

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2016-01-09
@JPascal

It will not be possible to refuse from init.d/init.
You can take a look at https://github.com/adamcooke/procman.
And one init.d script to start everything. And adjust capistrano accordingly.

S
sim3x, 2016-01-09
@sim3x

Combine two approaches:
start through init.d
and in

start(){ su - UserName -c "capistrano do some shit with UserName rights"  }
lower privileges

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question