Loading src/install.sh +30 −16 Original line number Diff line number Diff line Loading @@ -21,8 +21,19 @@ fi # Display wait message /run/server.sh 5000 install & # Detect country DL="" COUNTRY="" DL_CHINA="https://cndl.synology.cn/download/DSM" DL_GLOBAL="https://global.synologydownload.com/download/DSM" [[ "${URL,,}" == *"cndl.synology"* ]] && DL="$DL_CHINA" [[ "${URL,,}" == *"global.synology"* ]] && DL="$DL_GLOBAL" if [ -z "$DL" ]; then info "Install: Selecting download mirror..." # Detect country { JSON=$(curl -sfk https://ipinfo.io/json); rc=$?; } || : if (( rc == 0 )); then Loading @@ -40,13 +51,14 @@ fi # Select download mirror based on country if [ "$COUNTRY" == "CN" ]; then DL="https://cndl.synology.cn/download/DSM" DL="$DL_CHINA" else DL="https://global.synologydownload.com/download/DSM" DL="$DL_GLOBAL" fi fi # Select default version based on architecture if [ -z "$URL" ]; then # Select default version based on architecture if [ "$ARCH" == "amd64" ]; then URL="$DL/release/7.2.1/69057-1/DSM_VirtualDSM_69057.pat" else Loading @@ -68,6 +80,8 @@ rm -f "$STORAGE"/"$BASE".agent rm -f "$STORAGE"/"$BASE".boot.img rm -f "$STORAGE"/"$BASE".system.img info "Install: Checking filesystem..." [[ "${DEBUG}" == [Yy1]* ]] && set -x # Check filesystem Loading Loading
src/install.sh +30 −16 Original line number Diff line number Diff line Loading @@ -21,8 +21,19 @@ fi # Display wait message /run/server.sh 5000 install & # Detect country DL="" COUNTRY="" DL_CHINA="https://cndl.synology.cn/download/DSM" DL_GLOBAL="https://global.synologydownload.com/download/DSM" [[ "${URL,,}" == *"cndl.synology"* ]] && DL="$DL_CHINA" [[ "${URL,,}" == *"global.synology"* ]] && DL="$DL_GLOBAL" if [ -z "$DL" ]; then info "Install: Selecting download mirror..." # Detect country { JSON=$(curl -sfk https://ipinfo.io/json); rc=$?; } || : if (( rc == 0 )); then Loading @@ -40,13 +51,14 @@ fi # Select download mirror based on country if [ "$COUNTRY" == "CN" ]; then DL="https://cndl.synology.cn/download/DSM" DL="$DL_CHINA" else DL="https://global.synologydownload.com/download/DSM" DL="$DL_GLOBAL" fi fi # Select default version based on architecture if [ -z "$URL" ]; then # Select default version based on architecture if [ "$ARCH" == "amd64" ]; then URL="$DL/release/7.2.1/69057-1/DSM_VirtualDSM_69057.pat" else Loading @@ -68,6 +80,8 @@ rm -f "$STORAGE"/"$BASE".agent rm -f "$STORAGE"/"$BASE".boot.img rm -f "$STORAGE"/"$BASE".system.img info "Install: Checking filesystem..." [[ "${DEBUG}" == [Yy1]* ]] && set -x # Check filesystem Loading