Modify openHAB service setup instructions for manual Linux installations (#2644)

Updated the instructions for setting up openHAB as a systemd service on manual Linux installations to include the newly introduced linux.parameters file for overwriting environmental variables:

https://github.com/openhab/openhab-linuxpkg/pull/233

Signed-off-by: sihui <10405486+sihui62@users.noreply.github.com>
pull/2669/merge
sihui 2026-03-17 14:54:03 +01:00 committed by GitHub
parent 1921d44f30
commit f365c657b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -557,6 +557,7 @@ A cleaner approach is to create a Linux service.
The following instructions are intended for a Linux init system based on **systemd** (e.g. Debian 8 / Ubuntu 15.x and newer).
This will allow you to register openHAB as a service, so that it runs at startup and automatically restarts if openHAB crashes.
The service will be running with the privileges of the user "openhab" and expects the openHAB files under `/opt/openhab`.
Additionally, if you need to modify environment variables, create the file `/opt/openhab/conf/linux.parameters` with your changes or additions.
Create the file `/usr/lib/systemd/system/openhab.service` with the following content:
@ -573,7 +574,7 @@ User=openhab
Group=openhab
WorkingDirectory=/opt/openhab
#EnvironmentFile=-/etc/default/openhab
EnvironmentFile=-/opt/openhab/conf/linux.parameters
ExecStart=/opt/openhab/runtime/bin/karaf daemon
ExecStop=/opt/openhab/runtime/bin/karaf stop