Automaticly refresh installation page

Automaticly refresh installation page
This commit is contained in:
Kroese 2023-04-21 22:04:01 +02:00 committed by GitHub
commit 6323b9f173
4 changed files with 11 additions and 7 deletions

View File

@ -14,7 +14,7 @@ fi
IP=$(cat "${FILE}")
if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/" > /dev/null; then
echo "Failed to reach ${IP}"
echo "Failed to reach ${IP}:${PORT}"
exit 1
fi

View File

@ -2,7 +2,13 @@
set -eu
# Display wait message on port 5000
/run/server.sh 5000 "Please wait while Virtual DSM is installing..." > /dev/null &
HTML="Please wait while Virtual DSM is installing...<script>\
setTimeout(() => { document.location.reload(); }, 9999);</script>"
/run/server.sh 5000 "${HTML}" > /dev/null &
# Download the required files from the Synology website
DL="https://global.synologydownload.com/download/DSM"
@ -35,7 +41,7 @@ LOC="$DL/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
SUM=$(md5sum "$RD" | cut -f 1 -d " ")
if [ "$SUM" != "14fb88cb7cabddb5af1d0269bf032845" ]; then
echo "Invalid extractor, checksum failed." && exit 61
echo "Invalid extractor, checksum mismatch." && exit 61
fi
set +e
@ -139,8 +145,6 @@ if [[ SIZE -ne SYSTEM_SIZE ]]; then
echo "ERROR: System disk has the wrong size: ${SIZE}" && exit 90
fi
echo "Install: Creating partition table..."
PART="$TMP/partition.fdisk"
{ echo "label: dos"

View File

@ -54,7 +54,7 @@ _graceful_shutdown() {
else
echo
echo "Please update the VirtualDSM Agent to allow gracefull shutdowns..."
echo "Please update the VirtualDSM Agent to allow for gracefull shutdowns..."
PID=$(cat "${_QEMU_PID}")
kill -15 "${PID}"

View File

@ -3,7 +3,7 @@ set -eu
# Docker environment variabeles
: ${URL:=''}. # URL of PAT file
: ${URL:=''}. # URL of the PAT file
: ${DEBUG:=''}. # Enable debug mode
: ${ALLOCATE:='Y'} # Preallocate diskspace
: ${CPU_CORES:='1'} # Amount of CPU cores