Display boot message

This commit is contained in:
Kroese 2023-05-03 06:12:17 +02:00 committed by GitHub
parent 4e1abd981d
commit 9bee5c4263

View File

@ -230,6 +230,10 @@ if [ "$DHCP" != "Y" ]; then
# Configuration for static IP
configureNAT
# Display wait message on port 5000
HTML="Please wait while Virtual DSM is booting...<script>\
setTimeout(() => { document.location.reload(); }, 9999);</script>"
else
if [[ "$GATEWAY" == "172."* ]]; then
@ -244,12 +248,12 @@ else
HTML="The location of DSM is http://${DHCP_IP}:5000<script>\
setTimeout(function(){ window.location.replace('http://${DHCP_IP}:5000'); }, 2000);</script>"
pkill -f server.sh
/run/server.sh 80 "${HTML}" > /dev/null &
/run/server.sh 5000 "${HTML}" > /dev/null &
fi
pkill -f server.sh
/run/server.sh 80 "${HTML}" > /dev/null &
/run/server.sh 5000 "${HTML}" > /dev/null &
NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
if [ "$DHCP" = "Y" ]; then