mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-07 08:19:17 +00:00
update build.func
This commit is contained in:
parent
3e189531c6
commit
47ac39423c
@ -739,6 +739,11 @@ config_file(){
|
|||||||
MIN_ID=${BASH_REMATCH[1]}
|
MIN_ID=${BASH_REMATCH[1]}
|
||||||
MAX_ID=${BASH_REMATCH[2]}
|
MAX_ID=${BASH_REMATCH[2]}
|
||||||
|
|
||||||
|
if (( MIN_ID >= MAX_ID )); then
|
||||||
|
msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
LIST_OF_IDS=$( pvesh get /cluster/resources --type vm --output-format json | jq '.[] .vmid' -r)
|
LIST_OF_IDS=$( pvesh get /cluster/resources --type vm --output-format json | jq '.[] .vmid' -r)
|
||||||
|
|
||||||
for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do
|
for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do
|
||||||
@ -747,7 +752,7 @@ config_file(){
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
|
|
||||||
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user