how to automatic run my program after system start up.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to automatic run my program after system start up.

_madcc
Hi,all
I want to run my program automaticly after system start up,since when outdoor,you can't plug a VGA screen.
I edit the /etc/rc.local:

if [ -f /home/asctec/project/run.sh ]; then
    echo "one" > /home/asctec/test
    su -c '/home/asctec/project/run.sh'
    echo "two" >> /home/asctec/test
fi

but when I plug the VGA ,and restart the mastermind,I can't make sure the 'run.sh' has been executed or not.
in the file test, I can only see "one".
by the way,the 'run.sh' is a dead loop.
Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to automatic run my program after system start up.

andre@asctec
Hi _madcc,

if run.sh is a dead loop you will of course never see the output "two" in your test file. You may check if your script is running with something like "ps -ef | grep run.sh", which should show you the executing process of your script.

Cheers,
Andre
Andre Ryll
AscTec Application Engineer
Loading...