Skip to content

Commit b9f92b6

Browse files
committed
Change lxc id detection
1 parent 2892b7b commit b9f92b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ if [ $ctid -gt 99 ]; then
119119
LXC_CHK=$ctid
120120
else
121121
# Get next free LXC-number
122-
LXC_LST=$( lxc-ls -1 | tail -1 )
123-
LXC_CHK=$((LXC_LST+1));
122+
LXC_CHK=$(($(pct list | cut -d' ' -f1 | tail -1) + 1))
124123
fi
125124

126125
if [ $LXC_CHK -lt 100 ] || [ -f /etc/pve/qemu-server/$LXC_CHK.conf ]; then

0 commit comments

Comments
 (0)