Closed NolanGarrett closed 7 years ago
The deb package installation doesn't add openHAB to the on-boot startup as you can see here: https://github.com/openhab/openhab-linuxpkg/blob/master/resources/deb/control-runtime/postinst#L31 and here: https://github.com/openhab/openhab-distro/blob/master/distributions/distribution-resources/src/main/resources/deb/control-runtime/postinst#L30 I'm not sure what happens in your test case.
On upgrades openHAB is started regardless if it has been running before or not, this is clearly a bug. We have to remove this stopOpenHAB call: https://github.com/openhab/openhab-linuxpkg/blob/master/resources/deb/control-runtime/prerm#L24 and check the openHAB status in postinst:upgrade and only restart if the service is already running: https://github.com/openhab/openhab-linuxpkg/blob/master/resources/deb/control-runtime/postinst#L52
Hi @NolanGarrett, apologies for the delay. The latest versions of the Linux Package won't restart if openHAB wasn't running to begin with. Since the feature is new, the first update won't restart regardless, but will prompt you in doing so manually.
Perhaps this is by design, however, if you install openhab2-online via apt-get on Ubuntu, then disable on-boot startup of OH2 via systemctl disable openhab2, the next time you upgrade your package via apt-get openhab2 will again be set to start on boot (and will even be started at the end of the upgrade process). Tested on Ubuntu 16.04.1 LTS.