mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
fix: use robust systemd service detection in updater
This commit is contained in:
+2
-1
@@ -108,7 +108,8 @@ if [ -z "$BRANCH" ]; then
|
||||
[ "$BRANCH" = "HEAD" ] && BRANCH="main"
|
||||
fi
|
||||
|
||||
if ! systemctl list-unit-files --type=service | grep -q "^${SERVICE_NAME}\.service"; then
|
||||
load_state="$(systemctl show "$SERVICE_NAME" --property=LoadState --value 2>/dev/null || true)"
|
||||
if [ -z "$load_state" ] || [ "$load_state" = "not-found" ]; then
|
||||
die "Service not found: ${SERVICE_NAME}.service"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user