I have a script in /etc/init.d/
called foo.sh
that runs six (JAVA) Spring Boot jars. All of the jars require environmental variables to run. This script was added to rc.d
via update-rc.d foo.sh defaults
. Environmental variables needed were added to /etc/environment/
.
Whenever I reboot the server, the script runs but one of the java modules cannot find env variables, the other 5 run correctly. If I try to run the script manually, it has no issues at all. I have ran this a million ways in order to determine if the problem is in the java code, but it is not.
What exactly is happening here and how could I solve it so that on a reboot all jars can access global environmental variables?