mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-06-30 02:57:38 +00:00
update build.func
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user