mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 09:57:32 +08:00
feat: Support image commit
This commit is contained in:
parent
517b824a51
commit
a0c7c2795a
@ -17,6 +17,7 @@ echo "❯ For support visit $SUPPORT"
|
||||
|
||||
: "${TZ:=""}" # System local timezone
|
||||
: "${DEBUG:="N"}" # Disable debugging mode
|
||||
: "${COMMIT:="N"}" # Commit to local image
|
||||
: "${COUNTRY:=""}" # Country code for mirror
|
||||
: "${CONSOLE:="N"}" # Disable console mode
|
||||
: "${ALLOCATE:=""}" # Preallocate diskspace
|
||||
@ -25,13 +26,13 @@ echo "❯ For support visit $SUPPORT"
|
||||
: "${RAM_SIZE:="1G"}" # Maximum RAM amount
|
||||
: "${RAM_CHECK:="Y"}" # Check available RAM
|
||||
: "${DISK_SIZE:="16G"}" # Initial data disk size
|
||||
: "${STORAGE:="/storage"}" # Storage folder location
|
||||
|
||||
# Helper variables
|
||||
|
||||
PROCESS="${APP,,}"
|
||||
PROCESS="${PROCESS// /-}"
|
||||
|
||||
STORAGE="/storage"
|
||||
INFO="/run/shm/msg.html"
|
||||
PAGE="/run/shm/index.html"
|
||||
TEMPLATE="/var/www/index.html"
|
||||
@ -79,9 +80,14 @@ fi
|
||||
|
||||
# Check folder
|
||||
|
||||
if [[ "$COMMIT" != [Nn]* ]]; then
|
||||
STORAGE="/local"
|
||||
mkdir -p "$STORAGE"
|
||||
else
|
||||
if [ ! -d "$STORAGE" ]; then
|
||||
error "Storage folder ($STORAGE) not found!" && exit 13
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check filesystem
|
||||
FS=$(stat -f -c %T "$STORAGE")
|
||||
|
Loading…
x
Reference in New Issue
Block a user