diff options
Diffstat (limited to 'adu-upgrade.service')
-rw-r--r-- | adu-upgrade.service | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/adu-upgrade.service b/adu-upgrade.service new file mode 100644 index 0000000..872ddf2 --- /dev/null +++ b/adu-upgrade.service @@ -0,0 +1,31 @@ +# man:systemd.offline-updates(7): +# "Use FailureAction=reboot in the service file for your update script to +# ensure that a reboot is automatically triggered if the update fails." +# [...] +# "The update service should declare DefaultDependencies=no, +# Requires=sysinit.target, After=sysinit.target, +# After=system-update-pre.target, Before=system-update.target and explicitly +# pull in any other services it requires." +[Unit] +Description=Apt Desktop Upgrades package upgrader +FailureAction=reboot +DefaultDependencies=no +Requires=sysinit.target +After=sysinit.target +After=system-update-pre.target +Before=system-update.target + +[Service] +Type=oneshot +ExecStart=/usr/local/sbin/adu-upgrade + +# man:systemd.offline-updates(7): +# "To make things a bit more robust we recommend hooking the update script +# into system-update.target via a .wants/ symlink in the distribution +# package, rather than depending on systemctl enable in the postinst +# scriptlets of your package. More specifically, for your update script +# create a .service file, without [Install] section, and then add a symlink +# like /lib/systemd/system/system-update.target.wants/foobar.service → ../foobar.service +# to your package." +#[Install] +#WantedBy=offline-updates.target |