Skip to content

Commit

Permalink
feat: retry system & flatpak updates on failure
Browse files Browse the repository at this point in the history
On failure, update services have been configured to try again every 2
minutes up to 5 times.
  • Loading branch information
ryanpz committed Jan 4, 2025
1 parent e8481c7 commit 363afa1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[Unit]
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=20m
StartLimitBurst=5

[Service]
Restart=on-failure
RestartSec=2m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Description=Flatpak Automatic Update
Documentation=man:flatpak(1)
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=20m
StartLimitBurst=5

[Service]
Type=oneshot
ExecStart=/usr/bin/dbus-run-session /usr/bin/flatpak --system uninstall --unused -y --noninteractive ; /usr/bin/dbus-run-session /usr/bin/flatpak --system update -y --noninteractive ; /usr/bin/dbus-run-session /usr/bin/flatpak --system repair
Restart=on-failure
RestartSec=2m
4 changes: 4 additions & 0 deletions files/system/usr/lib/systemd/user/flatpak-user-update.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Description=Flatpak Automatic Update
Documentation=man:flatpak(1)
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=20m
StartLimitBurst=5

[Service]
Type=oneshot
ExecStart=/usr/bin/flatpak --user uninstall --unused -y --noninteractive ; /usr/bin/flatpak --user update -y --noninteractive ; /usr/bin/flatpak --user repair
Restart=on-failure
RestartSec=2m

0 comments on commit 363afa1

Please sign in to comment.