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
7974bfdddb
commit
fc303669e3
@ -744,7 +744,7 @@ config_file(){
|
||||
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 | grep -oP '"vmid":\s*\K\d+' )
|
||||
|
||||
for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do
|
||||
if ! grep -q "^$ID$" <<< "$LIST_OF_IDS"; then
|
||||
@ -757,7 +757,7 @@ config_file(){
|
||||
|
||||
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
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user