cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bog_dan
Visitor
Visitor
384 Views
Registered: ‎02-21-2018

Background Applications in Shell Script

Hi everyone,

 

Does anyone know if it is possible to start multiple applications in the background from a bootscript? I currently have the bootscript executes successfully. For testing I just wrote a bunch of hello world prints in a loop with a delay so it doesn't clog the terminal. Right now from the bootscript starts the first application but not the others. I assume that means that it started the application in the foreground. I can start all three apps in the background from the command line, but would like to do it from the bootscript if possible. My script is below.

 

#!/bin/sh -v

CMD0="cd /usr/bin"
CMD1="testapp &"
CMD2="app2 & testapp2 & testapp 3 &"

echo "Running boot script"
${CMD0}
${CMD1}
${CMD2}

The script starts app2, then locks. App2 is the first application in the boot process with a while(1) loop.

 

Thanks for any help.

0 Kudos
0 Replies