[PATCH] service: set 'Restart=always' to ensure failing services always restart

3 views
Skip to first unread message

Adrian DC

unread,
Feb 20, 2026, 3:31:27 PM (2 days ago) Feb 20
to swup...@googlegroups.com, Stefano Babic, Adrian DC
Systemd default value is 'Restart=no', hence a failing SWUpdate service
might stay broken and never restart back to normal usage
---

Signed-off-by: Adrian DC <radi...@gmail.com>
---
recipes-support/swupdate/swupdate/swupdate-progress.service | 1 +
recipes-support/swupdate/swupdate/swupdate-usb@.service | 1 +
recipes-support/swupdate/swupdate/swupdate.service | 1 +
3 files changed, 3 insertions(+)

diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service b/recipes-support/swupdate/swupdate/swupdate-progress.service
index 0d464bb..cdbca07 100644
--- a/recipes-support/swupdate/swupdate/swupdate-progress.service
+++ b/recipes-support/swupdate/swupdate/swupdate-progress.service
@@ -4,6 +4,7 @@ After=swupdate.service

[Service]
ExecStart=/usr/bin/swupdate-progress -r -w
+Restart=always

[Install]
WantedBy=swupdate.service
diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service b/recipes-support/swupdate/swupdate/swupdate-usb@.service
index 28d805f..dde15a6 100644
--- a/recipes-support/swupdate/swupdate/swupdate-usb@.service
+++ b/recipes-support/swupdate/swupdate/swupdate-usb@.service
@@ -9,3 +9,4 @@ ExecStartPre=/bin/mount /dev/%I /tmp/%I
ExecStart=/bin/sh -c "swupdate-client -v /tmp/%I/*.swu"
ExecStopPost=/bin/umount /tmp/%I
ExecStopPost=/bin/rmdir /tmp/%I
+Restart=always
diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service
index 7f8e966..9edcd4e 100644
--- a/recipes-support/swupdate/swupdate/swupdate.service
+++ b/recipes-support/swupdate/swupdate/swupdate.service
@@ -6,6 +6,7 @@ Documentation=https://sbabic.github.io/swupdate
[Service]
Type=notify
ExecStart=@LIBDIR@/swupdate/swupdate.sh
+Restart=always
KillMode=mixed

[Install]
--
2.43.0

Reply all
Reply to author
Forward
0 new messages