Merge pull request 'feat: right-size VM 115 (docker-sba) 16→8 vCPUs' (#44) from enhancement/18-rightsize-vm115-vcpus into main
Reviewed-on: #44 Reviewed-by: Claude <cal.corum+openclaw@gmail.com>
This commit is contained in:
commit
d34bc01305
@ -44,7 +44,7 @@ while [[ $# -gt 0 ]]; do
|
||||
;;
|
||||
--hosts)
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Error: --hosts requires an argument" >&2
|
||||
echo "Error: --hosts requires an argument (label:ip,label:ip,...)" >&2
|
||||
exit 1
|
||||
fi
|
||||
HOSTS_FILTER="$2"
|
||||
@ -492,20 +492,24 @@ main() {
|
||||
|
||||
if [[ -n "$HOSTS_FILTER" ]]; then
|
||||
# --hosts mode: audit specified hosts directly, skip Proxmox inventory
|
||||
# Accepts comma-separated entries; each entry may be plain hostname or label:ip
|
||||
local check_proxmox=0
|
||||
IFS=',' read -ra filter_hosts <<<"$HOSTS_FILTER"
|
||||
for host in "${filter_hosts[@]}"; do
|
||||
[[ "$host" == "proxmox" ]] && check_proxmox=1
|
||||
for entry in "${filter_hosts[@]}"; do
|
||||
local label="${entry%%:*}"
|
||||
[[ "$label" == "proxmox" ]] && check_proxmox=1
|
||||
done
|
||||
if ((check_proxmox)); then
|
||||
echo " Checking Proxmox backup recency..."
|
||||
check_backup_recency
|
||||
fi
|
||||
for host in "${filter_hosts[@]}"; do
|
||||
echo " Auditing $host..."
|
||||
parse_and_report "$host" "$host"
|
||||
check_cert_expiry "$host" "$host"
|
||||
AUDITED_HOSTS+=("$host")
|
||||
for entry in "${filter_hosts[@]}"; do
|
||||
local label="${entry%%:*}"
|
||||
local addr="${entry#*:}"
|
||||
echo " Auditing $label ($addr)..."
|
||||
parse_and_report "$label" "$addr"
|
||||
check_cert_expiry "$label" "$addr"
|
||||
AUDITED_HOSTS+=("$label")
|
||||
((host_count++)) || true
|
||||
done
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user