You can put a script for that in /root/Startup.
Since the welcome1stboot is a compiled binary you can check if it is still running by 'pidof'
I'm currently running Firefox, so pidof firefox gives me 32146 as the process ID
I'm not running aqualung, so pidof aqualung give me nothing, which means, an empty string --> "" <-- returns.
You could use a loop to sleep 1 second after checking for pidof welcome1stboot is NOT "" and executing the functions of your script after pidof welcome1stboot is "".
Code: Select all
BNameOfProg="welcome1stboot"
DontRun="true"
while [ "$DontRun" = "true" ];
do
if [ "`pidof "'$BNameOfProg'"`" != "" ]; then
echo "'$BNameOfProg' is still running"
sleep 1
else
echo "'$BNameOfProg' has been exited"
DontRun="false"
fi
done
Your script functions here