Bug#804018: options to avoid service startup on package installation

Moritz Mühlenhoff jmm at inutil.org
Thu Jul 15 13:32:24 BST 2021


Am Fri, Jul 27, 2018 at 04:13:52PM +0800 schrieb Sean Whitton:
> AFAICT the work to be done here is to expand a spec which already lives
> in init-system-helpers, and improve some tooling which will live in
> init-system-helpers.  So this bug should be reassigned to
> init-system-helpers.
> 
> Thanks Ian for unsticking this bug.

JFTR, this feature already exists natively in systemd in combination
with init-system-helpers. It's working fine in Bullseye, but doesn't in
Buster (not sure if there was an explicit bug fix which made it work):

Adding a /etc/systemd/system-preset/apache2.preset file with the content
"disable apache2.service" will correctly prevent the service from starting
upon installation. This works both for services with a native systemd unit
(like apache2), but also for services which ship a sysvinit script which
gets auto-translated to a systemd unit (e.g. nginx).

Cheers,
	 Moritz



More information about the Pkg-systemd-maintainers mailing list