Thanks in advance for reading my post. I'm having an issue with my program performing differently when it is started from my init.d script. It is a C++ program that I'm storing in the /usr/local/bin directory along with two properties files. One of the properties files is needed to run the program correctly. Everything works fine when the program is called from the command line such as:
myprogram or ./myprogram
but when my init.d script is used to start the program the binary won't open the needed properties files. I have checked the permissions on the init.d script (chmod 755) and made sure I updated the rc.d (sudo update-rc.d myprogram defaults) but I have not been able to figure this out. The LSB header of the init script looks like this:
#!/bin/bash
### BEGIN INIT INFO
# Provides: myprogram (where myprogram is the name of the init script)
# Required-Start: $local_fs $network $remote_fs $syslog
# Required-Stop: $local_fs $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: myprogram short description
# Description: Enable service provided by daemon
### END INIT INFO
Any help is really appreciated. Thanks.