Reputation: 1040
I try to execute a java application at startup in a yocto based linux device. I added a script at /etc/init.d/etic
and made it executable. If I call at the shell /etc/init.d/etic start
or /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?
Upvotes: 2
Views: 2847
Reputation: 9011
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.
Upvotes: 1