0

I use /etc/rc.local to autostart two services.

sh /home/ubuntu/osrm.sh || /bin/true
sh /home/ubuntu/photon.sh || /bin/true

|| /bin/true is used to ensure that it always succeeds even if the shell script fails.

My problem is that, only the first command executes. It also has to be noted that both scripts run services that keep running (i.e. webservices)

Diamond
  • 9,001
  • 3
  • 24
  • 38
Chris
  • 173
  • 1
  • 6
  • Subsequent commands only run once the the first one has completed. You probably want to modify the osrm.sh script to a proper startup script that starts/runs the actual service *in the background* so it completes once the service is up and running, rather than a script that keeps running for as long as the service is up and running. – HBruijn Mar 07 '16 at 09:46

1 Answers1

0

Ok it seems that the following works:

nohup /home/ubuntu/osrm.sh &
nohup /home/ubuntu/photon.sh &
Chris
  • 173
  • 1
  • 6