feat: Support image commit

This commit is contained in:
Kroese 2024-11-13 00:38:03 +01:00 committed by GitHub
parent 517b824a51
commit a0c7c2795a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,23 +15,24 @@ echo " For support visit $SUPPORT"
# Docker environment variables # Docker environment variables
: "${TZ:=""}" # System local timezone : "${TZ:=""}" # System local timezone
: "${DEBUG:="N"}" # Disable debugging mode : "${DEBUG:="N"}" # Disable debugging mode
: "${COUNTRY:=""}" # Country code for mirror : "${COMMIT:="N"}" # Commit to local image
: "${CONSOLE:="N"}" # Disable console mode : "${COUNTRY:=""}" # Country code for mirror
: "${ALLOCATE:=""}" # Preallocate diskspace : "${CONSOLE:="N"}" # Disable console mode
: "${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
: "${DISK_SIZE:="16G"}" # Initial data disk size
: "${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"
@ -79,8 +80,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
# Check filesystem # Check filesystem