mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 07:10:23 +00:00
fix(update): re-enable launchd service before updater bootstrap
This commit is contained in:
@@ -95,8 +95,10 @@ rm -f "$0"
|
||||
# Wait briefly to ensure file locks are released after update.
|
||||
sleep 1
|
||||
# Try kickstart first (works when the service is still registered).
|
||||
# If it fails (e.g. after bootout), re-register via bootstrap then kickstart.
|
||||
# If it fails (e.g. after bootout), clear any persisted disabled state,
|
||||
# then re-register via bootstrap and kickstart.
|
||||
if ! launchctl kickstart -k 'gui/${uid}/${escaped}' 2>/dev/null; then
|
||||
launchctl enable 'gui/${uid}/${escaped}' 2>/dev/null
|
||||
launchctl bootstrap 'gui/${uid}' '${escapedPlistPath}' 2>/dev/null
|
||||
launchctl kickstart -k 'gui/${uid}/${escaped}' 2>/dev/null || true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user