openHAB: Eigene openHAB Cloud – Startskript

Die Installation von einer eigenen openHAB Cloud bringt leider kein Startskript mit. Hier ein Beispiel wie eins Startskript aussehen könnte und wie man das Skript in den Autostart bekommt:

Das Skript erstellen: nano /etc/systemd/system/openhab.service

und mit folgendem Inhalt füllen:

[Unit]
Description=openhab-cloud
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/node /var/www/openhab.deinedomain.de/openhab-cloud/app.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

Die Befehle:
Autostart für openHAB aktivieren: systemctl enable openhab
openHAB starten: systemctl start openhab
openHAB stoppen: systemctl stop openhab
openHAB neustarten: systemctl restart openhab

Hinterlasse einen Kommentar

*

https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_bye.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_good.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_negative.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_scratch.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_wacko.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_yahoo.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_cool.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_heart.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_rose.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_smile.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_whistle3.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_yes.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_cry.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_mail.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_sad.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_unsure.gif 
https://www.maffert.net/wp-content/plugins/wp-monalisa/icons/wpml_wink.gif