Closed CWempe closed 7 years ago
Hi @CWempe, I first see if this problem is specific to sysVinit systems such as Wheezy. And will hopefully have a fix soon.
Great. No hurry. I am just starting to play with OH2 on a test system. :)
If I can help in any way, let me know.
I have the same issue on xubuntu 14.04 (with the repository packaged OH2 snapshot)
Same issue on Ubuntu 16.04 LTS. Is there a workaround?
My first workaround was editing /usr/share/openhab2/runtime/karaf/bin/setenv directly, which works but is irritating because you need to redo this with every update
My second workaround is not having a workaround, and instead changing the port on my other application...
It looks like it's being stripped as soon as the service is started.
What happens when any of you set a system-wide variable in /etc/environment
?
OPENHAB_HTTP_PORT=9090
OPENHAB_HTTPS_PORT=9091
may require a reboot.
makes no difference.
I set the variables in /etc/enviroment and rebooted. "env" shows the variables are active for my user but not for "sudo env".
The start script does not see the env variables either.
I was missing the OPENHAB_ in front of my variables when I added that and restarted the service it worked.
+1 also having this issue with ubuntu 14.04
You'll be glad to know that this works in the latest version of the packages. (Thanks @ralle12345 )
Simply add the following lines to /etc/default/openhab2
OPENHAB_HTTP_PORT=9090
OPENHAB_HTTPS_PORT=9091
and where is this file located on MacOSX? Openhab Documentation is so bad ...
@JannikZed, only the apt installation uses a specific file for relevant settings . As mentioned in the "Security and Remote Access" page, for other installations this is best done by setting the above as environment variables.
Changing the port number for http and https via /etc/default/openhab2 does not work.
The user can set the values like this:
OPENHAB_HTTP_PORT=9090 OPENHAB_HTTPS_PORT=9091
but the variables are empty inside /usr/share/openhab2/runtime/bin/setenv.
Reproduced on Raspbian Wheezy.
see: https://community.openhab.org/t/changing-port-number-on-openhab-2-0/2300/42