How would one create a Property that installs a package without starting the corresponding service?
I'm asking because sometimes the default config is broken, so you need to fix it before starting the service.
How would one create a Property that installs a package without starting the corresponding service?
I'm asking because sometimes the default config is broken, so you need to fix it before starting the service.
One way is to enable Propellor.Property.Service.noServices during the install and revert it afterwards, but that does prevent any services being started while it's enabled.
I don't know of a very good way to do this on a Debian system. If you can find one, I'm sure propellor can use it.
It might be possible, when systemd is used, to first apply Propellor.Property.Systemd.disabled on the service that has not been installed yet. I have not checked if that works.
Hello there,
I was typically in this situation : starting an apache server on a specific IP (the other IPs of the machine -on port 80- are used by other server processes), in particular to be able to get a certificate from let's encrypt.
When using :
The property is problematic (the initial 'Apache.installed' starts the apache server listening to ALL IPs). But at least at the end it seems that I get a 'running' service :
To avoid the transient service wrongly configured (it also messes up with the server serving port 80 on another IP) case I tried :
But then the configuration leads to having apache in an "ghost state", neither started nor stopped :
Which leads to an unavailable http service, and as a consequence to a failure in ACME / let's encrypt. Indeed it seems that the service is started using the 'old' Service system. The nice thing is that this makes it possible to use the 'noServices' property. The problem is that the systemd module is in a state not working anymore with 'Service'.
Finally I had to mix the 'noServices' property with a couple of 'Systemd' properties so that the server is properly restarted once the configuration is correct. This leads to a bit longer property but at least it works :
With this done, it seems to work.
Notice, however, that if apache was completely avoiding the 'old service' system, then we could not even benefit from the 'noService' in the first place. Would there be another solution to reach the same result ?
Hope this might help
Serge.