This commit fixes #1
This commit is contained in:
parent
62a63d3b7f
commit
12350dd855
@ -4,8 +4,11 @@ VMID=$(cat<<EOF | python3
|
|||||||
import json
|
import json
|
||||||
with open('/etc/pve/.vmlist') as vmlist:
|
with open('/etc/pve/.vmlist') as vmlist:
|
||||||
vmids = json.load(vmlist)
|
vmids = json.load(vmlist)
|
||||||
last_vm = sorted(vmids['ids'].keys())[-1:][0]
|
if 'ids' not in vmids:
|
||||||
print(int(last_vm)+1) if last_vm else print(100)
|
print(100)
|
||||||
|
else:
|
||||||
|
last_vm = sorted(vmids['ids'].keys())[-1:][0]
|
||||||
|
print(int(last_vm)+1)
|
||||||
EOF
|
EOF
|
||||||
) && \
|
) && \
|
||||||
echo -e "\n\n\n" \
|
echo -e "\n\n\n" \
|
||||||
|
Loading…
Reference in New Issue
Block a user