fix: force-stop service account during purge
This commit is contained in:
@@ -83,5 +83,13 @@ grep -Fq 'KAIDI_PURGE_CONFIRM=$REQUIRED_CONFIRMATION' "$ROOT/deploy/purge.sh" \
|
||||
|| fail 'destructive removal no longer requires explicit confirmation'
|
||||
grep -Fq 'External MySQL data and reverse-proxy configuration will not be modified' "$ROOT/deploy/purge.sh" \
|
||||
|| fail 'purge boundary is no longer explicit'
|
||||
# shellcheck disable=SC2016 # Match literal service-account cleanup calls.
|
||||
grep -Fq 'terminate_uid_processes "$service_uid"' "$ROOT/deploy/purge.sh" \
|
||||
|| fail 'dedicated service-account processes are not terminated before account removal'
|
||||
# shellcheck disable=SC2016 # Match literal forced account removal.
|
||||
grep -Fq 'userdel --force "$SERVICE_USER"' "$ROOT/deploy/purge.sh" \
|
||||
|| fail 'dedicated service-account removal is not resilient to a restarting panel process'
|
||||
grep -Fq '/etc/systemd/system/kaidi-update.service.d' "$ROOT/deploy/purge.sh" \
|
||||
|| fail 'updater systemd drop-ins are not removed'
|
||||
|
||||
printf 'Local purge and recovery fixture passed\n'
|
||||
|
||||
Reference in New Issue
Block a user