# 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