Semaphor Semaphor - 1 year ago 131
Linux Question

Start script on linux startup

I try to execute a java application at startup in a yocto based linux device. I added a script at

and made it executable. If I call at the shell
/etc/init.d/etic start
/etc/init.d/etic stop
the application is started an stopped as expected. Then I called on the shell
update-rc.d etic defaults
and the symlinks were created. According to what I found on the web, this should be enough, but somehow the application is not started. What did I miss? How could I check what is going wrong or is there any minimal example which should work which I can try to extend?

Answer Source

Well, often such issues are due to a different environment when executing the start script by hand, as compared to when it's being run from the init system. For instance, your .profile and .bashrc won't have been sourced, when running from the init system.

You can use eg logger to easily log things from your init-script, and this rather easily find out what goes wrong.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download