How to distinguish if a systemd unit is run by apt-get or during boot?

Patrick Schleizer patrick-mailinglists at whonix.org
Wed May 20 23:40:06 BST 2015


Hi!

Can one somehow distinguish if,

    a) the daemon was started during boot or,
    b) (re)started by an apt-get install or upgrade?

Can this be distinguished from within the daemon itself?

The use case is here to have script that is run by systemd
'Type=oneshot' only run on boot. Not during apt-get install or upgrades.

Cheers,
Patrick



More information about the Pkg-systemd-maintainers mailing list