openhab / openhab-linuxpkg

Repo for Linux packages
Eclipse Public License 2.0
18 stars 33 forks source link

If appropriate daemon tool exists, issue warning => and exit #208

Closed andrewfg closed 1 year ago

andrewfg commented 2 years ago

Background: When one issues the openhab-cli stop command, the script gives the warning below. However, after the warning, the script continues anyway (as shown below).

A systemd service configuration exists...
Use 'sudo /bin/systemctl stop openhab2.service' to stop an openHAB service
..
Stopping any instance of openHAB...

Problem: As a consequence the following two things happen one after the other..

This is clearly stupid, and confusing to users.

Solution: After issuing the warning message, the script should exit 1 instead of continuing.

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch