Rename Lldap-Gmer4Lfe to Lldap and guard local containers in cleanup
This commit is contained in:
@@ -431,6 +431,9 @@ cleanup_deployed_stack_locally() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
local _local_short
|
||||
_local_short=$(derive_short_name "${LOCAL_SERVER_NAME:-}")
|
||||
|
||||
log "Removing owner-deployed containers (auth/arr/services stacks) locally..."
|
||||
for xml_name in "${xml_names[@]}"; do
|
||||
[[ -z "$xml_name" ]] && continue
|
||||
@@ -444,6 +447,11 @@ cleanup_deployed_stack_locally() {
|
||||
cname=$(awk 'match($0,/<Name>([^<]+)<\/Name>/,a){print a[1];exit}' "$xml_file")
|
||||
[[ -z "$cname" ]] && continue
|
||||
|
||||
if [[ -n "$_local_short" && "$cname" == *"$_local_short"* ]]; then
|
||||
warn " $cname contains local server identity ($_local_short) — skipping to protect local containers"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$DRY_RUN" == true ]]; then
|
||||
warn " DRY RUN — would stop + rm $cname"
|
||||
warn " DRY RUN — would delete appdata for $cname"
|
||||
|
||||
Reference in New Issue
Block a user