diff --git a/conf/zamba.conf.example b/conf/zamba.conf.example index c28569f..b45134d 100644 --- a/conf/zamba.conf.example +++ b/conf/zamba.conf.example @@ -27,6 +27,9 @@ LXC_SHAREFS_STORAGE="local-zfs" # Defines the mountpoint of the filesystem shared by Zamba inside your LXC container (default: tank) LXC_SHAREFS_MOUNTPOINT="tank" +# cpu core count (default: 0 = unlimited) +LXC_THREADS=0 + # Defines the amount of RAM in MB your LXC container is allowed to use (default: 1024) LXC_MEM=1024 diff --git a/install.sh b/install.sh index ab91868..d4e6ce2 100755 --- a/install.sh +++ b/install.sh @@ -130,9 +130,13 @@ else fi echo "Will now create LXC Container $LXC_NBR!"; +if [ $LXC_THREADS -gt 0 ]; then + LXC_CORES=--cores$LXC_THREADS +fi + # Create the container set +u -pct create $LXC_NBR $TAGS --password $LXC_PWD -unprivileged $LXC_UNPRIVILEGED $LXC_TEMPLATE_STORAGE:vztmpl/$TMPL_NAME -rootfs $LXC_ROOTFS_STORAGE:$LXC_ROOTFS_SIZE; +pct create $LXC_NBR $TAGS $LXC_CORES --password $LXC_PWD -unprivileged $LXC_UNPRIVILEGED $LXC_TEMPLATE_STORAGE:vztmpl/$TMPL_NAME -rootfs $LXC_ROOTFS_STORAGE:$LXC_ROOTFS_SIZE; set -u sleep 2;