audit echo vs log across all scripts — outcomes always visible, verbose for per-item loops

This commit is contained in:
Gmer4Lfe
2026-06-14 12:40:15 -04:00
parent 4c37ab16fd
commit 3964f6fb46
1010 changed files with 377767 additions and 132 deletions
+8 -8
View File
@@ -43,7 +43,7 @@ wait_for_container_healthy() {
case "$status" in
healthy|true)
log " $name ready ✅"
echo " $name ready ✅"
return 0
;;
*)
@@ -159,7 +159,7 @@ deploy_container_from_xml() {
timeout 120 ssh -i "$ssh_key" -o ConnectTimeout="$SSH_TIMEOUT" root@"$remote_ip" \
"bash '$remote_script' 2>&1; rc=\$?; rm -f '$remote_script'; exit \$rc" 2>/dev/null | \
grep -q "deployed:${name}"; then
log " $name deployed ✅"
echo " $name deployed ✅"
rm -f "$tmp_script"
return 0
else
@@ -253,7 +253,7 @@ cleanup_deployed_stack_on_remote() {
"docker stop '$cname' >/dev/null 2>&1
docker rm '$cname' >/dev/null 2>&1 && echo removed" 2>/dev/null | \
grep -q removed && \
log " $cname removed from $MIRROR" || \
echo " $cname removed from $MIRROR" || \
log " $cname not found on $MIRROR — skipping"
while IFS= read -r path; do
@@ -261,7 +261,7 @@ cleanup_deployed_stack_on_remote() {
timeout "$SSH_TIMEOUT" ssh -i "$ssh_key" \
-o ConnectTimeout="$SSH_TIMEOUT" root@"$remote_ip" \
"rm -rf '$path' && echo removed" 2>/dev/null | grep -q removed && \
log " Appdata removed on $MIRROR: $path" || \
echo " Appdata removed on $MIRROR: $path" || \
warn " Failed to remove appdata on $MIRROR: $path"
done <<< "$appdata_paths"
done
@@ -331,14 +331,14 @@ cleanup_deployed_stack_locally() {
timeout "${DOCKER_TIMEOUT:-30}" docker stop "$cname" >/dev/null 2>&1 || true
_PM_TRAP_STOPPED+=("$cname")
timeout "${DOCKER_TIMEOUT:-30}" docker rm "$cname" >/dev/null 2>&1 && \
log " $cname removed ✅" || warn " $cname rm failed"
echo " $cname removed ✅" || warn " $cname rm failed"
else
log " $cname not found locally — skipping"
fi
while IFS= read -r path; do
[[ -z "$path" ]] && continue
rm -rf "$path" && log " Appdata removed: $path" || warn " Failed to remove: $path"
rm -rf "$path" && echo " Appdata removed: $path" || warn " Failed to remove: $path"
done <<< "$appdata_paths"
done
}
@@ -372,7 +372,7 @@ reconfigure_webui() {
-o ConnectTimeout="$SSH_TIMEOUT" root@"$remote_ip" \
"sed -i 's|<WebUI>.*</WebUI>|<WebUI>http://${target_ip}:${port}/</WebUI>|g' '$template'" \
2>/dev/null && \
log "$container → http://${target_ip}:${port}/ ✅" || {
echo "$container → http://${target_ip}:${port}/ ✅" || {
error "Failed to reconfigure $container WebUI on $label"
return 1
}
@@ -408,7 +408,7 @@ reconfigure_local_webuis() {
sed -i "s|<WebUI>.*</WebUI>|<WebUI>http://${target_ip}:${port}/</WebUI>|g" \
"$template" 2>/dev/null && \
log "$container → http://${target_ip}:${port}/ ✅" || \
echo "$container → http://${target_ip}:${port}/ ✅" || \
{ error "Failed to reconfigure $container"; (( failures++ )); }
done
return $failures