Closed teeminus closed 6 years ago
Everything looks good except the service unit file should not be changed. An override file should be created in /etc/systemd/system/domoticz.service.d/override.conf. This would typically be done with a shell script in /usr/share/openmediavault/mkconf/ (see the plex plugin for an example).
It would also be nice to not allow both enable http(s) checkboxes to be unchecked at the javascript level (client's browser). Then you wouldn't need to throw the error from the php script (which sometimes confuses users even though the error message is good).
Hi!
Thanks for your reply. I am a completly newby when it comes to OMV and the plugin system, so I chose the easiest way over the correct one :-D
I added the /etc/systemd/system/domoticz.service.d/override.conf file. The configuration for the service is now stored in /etc/default/domoticz which is updated by the setSettings(..) function.
I have no idea how to implement the client side configuration check. Can you please give me a hint how to do it the OMV way?
I will add the code later for the checkboxes. As for the daemon reload, it will need to be done every time the override file is altered. I am going to accept your pull request but I will then change a few things to be more OMV-like :) That will include the daemon reload step.
With this modification both the http and https ports which the domoticz service listens to can be changed. In addition the that, http and https can be disabled - but not both at the same time.