I’m running OH2 on Linux using the apt-get installer.
I’ve amended /usr/share/openhab2/runtime/bin/setenv to change the ports and add symlinks for USB devices; I’ve also amended /etc/init.d/openhab2 to change the default user. However both get overwritten each time I update.
In OH1.8 I fixed this by editing etc/default/openhab, but /etc/default/openhab2 seems to have a different format. If anyone has an example that would be most helpful
Hi @dan12345, the correct place to set environment variables is indeed /etc/default/openhab, this file gets called before openHAB starts, so you should be free to set variables used by openHAB on a new line. A common configuration is:
oddly this works to set the openhab user, and to set the symlinks, but it doesn’t work to change the ports - I have to manually edit /usr/share/openhab2/runtime/bin/setenv . Am I doing something subtly wrong?