Update install.sh

This commit is contained in:
whiskerz007 2019-02-19 07:32:24 +01:00 committed by GitHub
parent 62a63d3b7f
commit e82959dc8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,11 @@ VMID=$(cat<<EOF | python3
import json
with open('/etc/pve/.vmlist') as vmlist:
vmids = json.load(vmlist)
last_vm = sorted(vmids['ids'].keys())[-1:][0]
print(int(last_vm)+1) if last_vm else print(100)
if 'ids' not in vmids:
print(100)
else:
last_vm = sorted(vmids['ids'].keys())[-1:][0]
print(int(last_vm)+1)
EOF
) && \
echo -e "\n\n\n" \