From b9f92b610a7fca21a4a63995c119d5e1508e0434 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Mon, 8 Jul 2024 20:15:53 +0200 Subject: [PATCH] Change lxc id detection --- install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2e70f66..2bab1d5 100755 --- a/install.sh +++ b/install.sh @@ -119,8 +119,7 @@ if [ $ctid -gt 99 ]; then LXC_CHK=$ctid else # Get next free LXC-number - LXC_LST=$( lxc-ls -1 | tail -1 ) - LXC_CHK=$((LXC_LST+1)); + LXC_CHK=$(($(pct list | cut -d' ' -f1 | tail -1) + 1)) fi if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then