[SOLVED] openhab 2.3 installation failed (Result: exit-code)


(Jens Kluge) #1

My assumption was that this file needs to be created as explained in section https://www.openhab.org/docs/installation/linux.html#installation

Once deleted my system started

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/openhab2.

Create the file /lib/systemd/system/openhab2.service with the following content:

[Unit]
Description=The openHAB 2 Home Automation Bus Solution
Documentation=http://docs.openhab.org
Wants=network-online.target
After=network-online.target

[Service]
Type=expert
User=openhab
Group=openhab
GuessMainPID=yes
WorkingDirectory=/usr/share/openhab2
#EnvironmentFile=/etc/default/openhab2
ExecStart=/usr/share/openhab2/start.sh server
ExecStop=/bin/kill -SIGINT $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target