feat: Support image commit (#156)

This commit is contained in:
Kroese 2024-11-13 00:26:59 +01:00 committed by GitHub
parent c244483847
commit 4d1c1c476b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,24 +15,25 @@ echo " For support visit $SUPPORT"
# Docker environment variables # Docker environment variables
: "${BOOT:=""}" # URL of the ISO file : "${BOOT:=""}" # URL of the ISO file
: "${DEBUG:="N"}" # Disable debugging : "${DEBUG:="N"}" # Disable debugging
: "${MACHINE:="virt"}" # Machine selection : "${COMMIT:="N"}" # Commit to image
: "${ALLOCATE:=""}" # Preallocate diskspace : "${MACHINE:="virt"}" # Machine selection
: "${ARGUMENTS:=""}" # Extra QEMU parameters : "${ALLOCATE:=""}" # Preallocate diskspace
: "${CPU_CORES:="1"}" # Amount of CPU cores : "${ARGUMENTS:=""}" # Extra QEMU parameters
: "${RAM_SIZE:="1G"}" # Maximum RAM amount : "${CPU_CORES:="1"}" # Amount of CPU cores
: "${RAM_CHECK:="Y"}" # Check available RAM : "${RAM_SIZE:="1G"}" # Maximum RAM amount
: "${DISK_SIZE:="16G"}" # Initial data disk size : "${RAM_CHECK:="Y"}" # Check available RAM
: "${BOOT_MODE:=""}" # Boot system with UEFI : "${DISK_SIZE:="16G"}" # Initial data disk size
: "${BOOT_INDEX:="9"}" # Boot index of CD drive : "${BOOT_MODE:=""}" # Boot system with UEFI
: "${BOOT_INDEX:="9"}" # Boot index of CD drive
: "${STORAGE:="/storage"}" # Storage folder location
# Helper variables # Helper variables
PROCESS="${APP,,}" PROCESS="${APP,,}"
PROCESS="${PROCESS// /-}" PROCESS="${PROCESS// /-}"
STORAGE="/storage"
INFO="/run/shm/msg.html" INFO="/run/shm/msg.html"
PAGE="/run/shm/index.html" PAGE="/run/shm/index.html"
TEMPLATE="/var/www/index.html" TEMPLATE="/var/www/index.html"
@ -80,8 +81,13 @@ fi
# Check folder # Check folder
if [ ! -d "$STORAGE" ]; then if [[ "$COMMIT" != [Nn]* ]]; then
error "Storage folder ($STORAGE) not found!" && exit 13 STORAGE="/local"
mkdir -p "$STORAGE"
else
if [ ! -d "$STORAGE" ]; then
error "Storage folder ($STORAGE) not found!" && exit 13
fi
fi fi
# Read memory # Read memory