[plug] How to set 'global' environment variables at boot time?

Jason Nicholls jason at mindsocket.com.au
Fri Sep 14 11:31:57 WST 2012


>
> Does it mean that there is no way to set a global environment variable at
> boot time?
>

Sorry if it seemed that was implied.

My response was basically that I derive the CATALINA_HOME and other bits
based on where the install by symlinking the init script to it and then
working out where it is. Thereby doing away with the need to set a global
env at boot for the whole system and giving me the ability to run multiple
instances.

Otherwise I would (still specific and not system wide):

1) create a file in /etc/default (e.g. /etc/default/myTomcat)
2) source it in the init script

Otherwise as a global /etc/profile should do it. To test you can simply
have your script write something to a log and have a look after boot, e.g.

echo $CATALINA_HOME >> /tmp/check_env.log
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20120914/25b2f189/attachment.html>


More information about the plug mailing list