SysV init scripts don't have enough defined machine parseable semantics
to tell what they do. Some just run a few commands (the equivalent of
systemd's "Type=oneshot", others fork off a daemon (the equivalent of
"Type=forking"). Thus for SysV generated units, systemd defaults to
RemainAfterExit=yes as that's the safer default -- not doing so would
assume that the SysV script is idempotent. So I'm afraid this default
won't/can't be changed in a sensible way.

If you want to improve the behaviour particularly for Apache, then
indeed adding native service units would be best. This can then use
modern features such as socket activation, which vastly simplifies
inter-service dependencies, and avoids running apache unnecessarily. E.
g. Fedora does that
(http://pkgs.fedoraproject.org/cgit/rpms/httpd.git/tree/ has the units)

If that's too much effort for Xenial, then a simpler way would be to
just ship a drop-in `/lib/systemd/system/apache2.service.d/type.conf
with "[Service]\nType=forking", so that you just override this one
property from the generated unit.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1488962

Title:
  systemd does not notice when services created via systemd-sysv-
  generator fail

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1488962/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to