-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add systemd target for openHAB REST service availibility #138
Comments
We might be able to implement a shell script which has its own target unit file associated with it. The script would poll |
Sounds reasonable! But we have to find a solution to prevent this from running in case no REST bundle is installed. Maybe it should first poll openhab-cli and only start to poll REST if the bundle is actually installed? I'm just not sure if |
Other idea, if no automatic detection is possible, would be to prepare this systemd service/target, but keep it disabled by default (so that the user just enable it if needed). |
A service can be setup to retry a certain amount of times before stopping completely. Perhaps we can check to see if the bundle is active using:
|
Note: that due to the problem described in openhab/openhabian#792 the above commadn wont work without providing a password. |
Some other processes may depend on the availability of openHAB's REST service. If they depend on
openhab2.service
, this won't work because even when openhab2.service is started, REST service needs some extra time to be available. It would be good to setup a systemd target that other services can depend on (similar tonetwork-online.target
). I'd suggestopenhab2-rest.target
. Anyhow, I have no clue how this can be done :/The text was updated successfully, but these errors were encountered: