mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-07 16:29:18 +00:00
update build.func
This commit is contained in:
parent
7974bfdddb
commit
fc303669e3
@ -744,7 +744,7 @@ config_file(){
|
|||||||
exit
|
exit
|
||||||
fi
|
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 | grep -oP '"vmid":\s*\K\d+' )
|
||||||
|
|
||||||
for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do
|
for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do
|
||||||
if ! grep -q "^$ID$" <<< "$LIST_OF_IDS"; then
|
if ! grep -q "^$ID$" <<< "$LIST_OF_IDS"; then
|
||||||
@ -757,7 +757,7 @@ config_file(){
|
|||||||
|
|
||||||
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
||||||
|
|
||||||
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 | grep -oP '"vmid":\s*\K\d+' )
|
||||||
if ! grep -q "^$CT_ID$" <<< "$LIST_OF_IDS"; then
|
if ! grep -q "^$CT_ID$" <<< "$LIST_OF_IDS"; then
|
||||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user