flatpack autoupdate with systemd timers

flatpack autoupdate with systemd timers


Create services & timers

/etc/systemd/user/update-user-flatpaks.service

[Unit]
Description=Update user Flatpaks

[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak update --assumeyes --noninteractive

[Install]
WantedBy=default.target

/etc/systemd/system/update-system-flatpaks.service

[Unit]
Description=Update system Flatpaks
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak update --assumeyes --noninteractive --system

[Install]
WantedBy=multi-user.target

/etc/systemd/user/update-user-flatpaks.timer

[Unit]
Description=Update user Flatpaks daily

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target

/etc/systemd/system/update-system-flatpaks.timer

[Unit]
Description=Update system Flatpaks daily

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target

Enable timers

systemctl --user enable --now update-user-flatpaks.timer
sudo systemctl --system enable --now update-system-flatpaks.timer

Содержание