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)
|
--hosts)
|
||||||
if [[ $# -lt 2 ]]; then
|
if [[ $# -lt 2 ]]; then
|
||||||
echo "Error: --hosts requires an argument" >&2
|
echo "Error: --hosts requires an argument (label:ip,label:ip,...)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
HOSTS_FILTER="$2"
|
HOSTS_FILTER="$2"
|
||||||
@ -492,20 +492,24 @@ main() {
|
|||||||
|
|
||||||
if [[ -n "$HOSTS_FILTER" ]]; then
|
if [[ -n "$HOSTS_FILTER" ]]; then
|
||||||
# --hosts mode: audit specified hosts directly, skip Proxmox inventory
|
# --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
|
local check_proxmox=0
|
||||||
IFS=',' read -ra filter_hosts <<<"$HOSTS_FILTER"
|
IFS=',' read -ra filter_hosts <<<"$HOSTS_FILTER"
|
||||||
for host in "${filter_hosts[@]}"; do
|
for entry in "${filter_hosts[@]}"; do
|
||||||
[[ "$host" == "proxmox" ]] && check_proxmox=1
|
local label="${entry%%:*}"
|
||||||
|
[[ "$label" == "proxmox" ]] && check_proxmox=1
|
||||||
done
|
done
|
||||||
if ((check_proxmox)); then
|
if ((check_proxmox)); then
|
||||||
echo " Checking Proxmox backup recency..."
|
echo " Checking Proxmox backup recency..."
|
||||||
check_backup_recency
|
check_backup_recency
|
||||||
fi
|
fi
|
||||||
for host in "${filter_hosts[@]}"; do
|
for entry in "${filter_hosts[@]}"; do
|
||||||
echo " Auditing $host..."
|
local label="${entry%%:*}"
|
||||||
parse_and_report "$host" "$host"
|
local addr="${entry#*:}"
|
||||||
check_cert_expiry "$host" "$host"
|
echo " Auditing $label ($addr)..."
|
||||||
AUDITED_HOSTS+=("$host")
|
parse_and_report "$label" "$addr"
|
||||||
|
check_cert_expiry "$label" "$addr"
|
||||||
|
AUDITED_HOSTS+=("$label")
|
||||||
((host_count++)) || true
|
((host_count++)) || true
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user