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..
First of all openhab-cli stop does stop the OH service
Then the daemon detects that OH has stopped, -- and re-starts OH again!
This is clearly stupid, and confusing to users.
Solution:
After issuing the warning message, the script should exit 1 instead of continuing.
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).Problem: As a consequence the following two things happen one after the other..
openhab-cli stop
does stop the OH serviceThis 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