Documenting openHAB 2

Hey @Dim,
I did check and you are completely right - wrapper.conf is completely invalid because it is made for vanila karaf. So far there is no easy way to customize that. It is possible to override this resource with a fragment “extension” which will be specific to OH2 so generated resources will be in syns with what OH needs.

Because service wrapper replaces startup scripts all environment variables which are set in oh2_dir_layout should be clonned to it, meaning

export OPENHAB_USERDATA="${OPENHAB_HOME}/userdata"

must be ported to

set.default.OPENHAB_USERDATA=%OPENHAB_HOME%/userdata

in wrapper.conf

It might work without it in first moment but later on every code which will call getenv("OPENHAB_USERDATA") will behave differently depending on the way OH was started (command line or service).

1 Like