Change lxc id detection

This commit is contained in:
thorstenspille 2024-07-08 20:15:53 +02:00
parent 2892b7b416
commit b9f92b610a

View File

@ -119,8 +119,7 @@ if [ $ctid -gt 99 ]; then
LXC_CHK=$ctid LXC_CHK=$ctid
else else
# Get next free LXC-number # Get next free LXC-number
LXC_LST=$( lxc-ls -1 | tail -1 ) LXC_CHK=$(($(pct list | cut -d' ' -f1 | tail -1) + 1))
LXC_CHK=$((LXC_LST+1));
fi fi
if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then