[Unit] Description=Refresh apt package lists (for kernelwatch) # Pulled in by kernelwatch-agent.service before each report, so updates show up # within the hour instead of whenever apt-daily next refreshes the lists (on # Debian, by default, never). Enabled by `install.sh --with-apt-update`. ConditionPathExists=/etc/kernelwatch/apt-update Wants=network-online.target After=network-online.target [Service] Type=oneshot # Same as `apt-get update`: downloads lists, installs nothing. A failure (no # network, lock held by an admin's apt run) mustn't stop the report; the # dashboard flags lists that stay old. ExecStart=-/usr/bin/apt-get -q update TimeoutStartSec=5min Nice=10 IOSchedulingClass=idle # apt needs root to write /var/lib/apt and drops to _apt for downloads, so this # keeps root but loses everything apt update doesn't touch. User=root NoNewPrivileges=yes ProtectHome=yes PrivateTmp=yes PrivateDevices=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes ProtectClock=yes ProtectHostname=yes RestrictNamespaces=yes RestrictRealtime=yes LockPersonality=yes RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK SystemCallArchitectures=native