E
E
Ernest Faizullin2016-03-05 15:58:34
linux
Ernest Faizullin, 2016-03-05 15:58:34

Autorun commands after reboot ubuntu server (14.04)?

Hi all. I try to automatically run 2 commands after reboot by writing to /etc/rc.local :

php /var/www/html/artisan pusher:start
cd /var/www/html && node socket.js

exit 0

only the first php /var/www/html/artisan pusher:start fired , and the second command cd /var/www/html && node socket.js didn't start. Tell me how to start several processes at startup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2016-03-05
@erniesto77

The specified commands from the console are unhooked? As the name suggests, they are demons. And then if they do not unhook, then you wrote a sequential launch. node will only start after php has finished running.
But run them better through supervisord or something like that. And it is more convenient to start and the supervisor will restart the process itself in case of an abnormal termination.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question