[arch-dev-public] JAVA_HOME in systemd
Jan Steffens
jan.steffens at gmail.com
Wed Feb 6 08:36:34 EST 2013
On Wed, Feb 6, 2013 at 1:58 PM, Gaetan Bisson <bisson at archlinux.org> wrote:
> You can always have each Java runtime provide a different file, and
> include all of them in each Java service file using
>
> EnvironmentFile=-/path/to/java/runtime/number/one
> EnvironmentFile=-/path/to/java/runtime/number/two
>
> etc.
You can also pass a wildcard expression, avoiding hardcoding several files,
maybe like this:
EnvironmentFile=-/etc/java-runtime.d/*
EnvironmentFile=-/etc/java-runtime
Needs testing, but could allow the user to set a default runtime via symlink.
Alternatively, just EnvironmentFile=/etc/java-runtime and create this symlink
at post_install of every java-runtime, if it doesn't exist already.
To be tidy, post_remove then deletes the file if java-runtime.d
doesn't exist anymore.
More information about the arch-dev-public
mailing list