Update reset.sh

This commit is contained in:
Kroese 2025-03-17 22:46:13 +01:00 committed by GitHub
parent 44d040dcd5
commit 341df5b6e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,8 +20,8 @@ echo " For support visit $SUPPORT"
: "${MACHINE:="virt"}" # Machine selection : "${MACHINE:="virt"}" # Machine selection
: "${ALLOCATE:=""}" # Preallocate diskspace : "${ALLOCATE:=""}" # Preallocate diskspace
: "${ARGUMENTS:=""}" # Extra QEMU parameters : "${ARGUMENTS:=""}" # Extra QEMU parameters
: "${CPU_CORES:="1"}" # Amount of CPU cores : "${CPU_CORES:="2"}" # Amount of CPU cores
: "${RAM_SIZE:="1G"}" # Maximum RAM amount : "${RAM_SIZE:="2G"}" # Maximum RAM amount
: "${RAM_CHECK:="Y"}" # Check available RAM : "${RAM_CHECK:="Y"}" # Check available RAM
: "${DISK_SIZE:="16G"}" # Initial data disk size : "${DISK_SIZE:="16G"}" # Initial data disk size
: "${BOOT_MODE:=""}" # Boot system with UEFI : "${BOOT_MODE:=""}" # Boot system with UEFI
@ -69,6 +69,8 @@ CPU="${CPU// 8 Core/}"
CPU="${CPU// 16 Core/}" CPU="${CPU// 16 Core/}"
CPU="${CPU// 32 Core/}" CPU="${CPU// 32 Core/}"
CPU="${CPU// 64 Core/}" CPU="${CPU// 64 Core/}"
CPU="${CPU//10th Gen /}"
CPU="${CPU//11th Gen /}"
CPU="${CPU//12th Gen /}" CPU="${CPU//12th Gen /}"
CPU="${CPU//13th Gen /}" CPU="${CPU//13th Gen /}"
CPU="${CPU//14th Gen /}" CPU="${CPU//14th Gen /}"
@ -310,6 +312,19 @@ fi
# Set password # Set password
echo "$user:{PLAIN}${PASS:-}" > /etc/nginx/.htpasswd echo "$user:{PLAIN}${PASS:-}" > /etc/nginx/.htpasswd
# shellcheck disable=SC2143
if [ -f /proc/net/if_inet6 ] && [ -n "$(ifconfig -a | grep inet6)" ]; then
sed -i "s/listen 80;/listen [::]:80 ipv6only=off;/g" /etc/nginx/sites-enabled/web.conf
sed -i "s/listen 8006 default_server;/listen [::]:8006 default_server ipv6only=off;/g" /etc/nginx/sites-enabled/web.conf
else
sed -i "s/listen [::]:80 ipv6only=off;/listen 80;/g" /etc/nginx/sites-enabled/web.conf
sed -i "s/listen [::]:8006 default_server ipv6only=off;/listen 8006 default_server;/g" /etc/nginx/sites-enabled/web.conf
fi
# Start webserver # Start webserver
cp -r /var/www/* /run/shm cp -r /var/www/* /run/shm
html "Starting $APP for Docker..." html "Starting $APP for Docker..."