diff --git a/run/install.sh b/run/install.sh index 7d42c51..e08ffbe 100644 --- a/run/install.sh +++ b/run/install.sh @@ -1,14 +1,9 @@ #!/usr/bin/env bash set -Eeuo pipefail -# Display wait message on port 5000 -HTML="Please wait while Virtual DSM is installing..." - -{ pkill -f server.sh || true; } 2>/dev/null - -/run/server.sh 80 "${HTML}" & -/run/server.sh 5000 "${HTML}" & +# Display wait message +/run/server.sh 80 install & +/run/server.sh 5000 install & # Download the required files from the Synology website DL="https://global.synologydownload.com/download/DSM" diff --git a/run/server.sh b/run/server.sh index 950c9a1..1b4431f 100644 --- a/run/server.sh +++ b/run/server.sh @@ -11,9 +11,29 @@ stop() { trap 'stop' EXIT SIGINT SIGTERM SIGHUP -if [[ "$2" == "/"* ]]; then +if [[ "$2" != "/"* ]]; then - if [[ "$2" == "/run/ip.sh" ]]; then + BODY="$2" + + if [[ "$BODY" == "install" ]]; then + + BODY="Please wait while Virtual DSM is installing..." + + fi + + HTML="