Loading src/check.sh +12 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,18 @@ file="/run/dsm.url" location=$(cat "$file") if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then echo "Failed to reach page at http://$location" && exit 1 if [[ "$location" == "20.20"* ]]; then ip="20.20.20.1" port="${location##*:}" echo "Failed to reach DSM at port $port" else echo "Failed to reach DSM at http://$location" ip=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) fi echo "You might need to whitelist IP $ip in the DSM firewall." && exit 1 fi echo "Healthcheck OK" Loading src/install.sh +3 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ else TMP="/tmp/dsm" SPACE=$(df --output=avail -B 1 /tmp | tail -n 1) if (( MIN_SPACE > SPACE )); then DEV="N" TMP="$STORAGE/tmp" info "Warning: the $FS filesystem of $STORAGE does not support UNIX permissions.." fi Loading Loading @@ -199,15 +200,14 @@ if ((SIZE<250000000)); then error "The specified PAT file is probably an update pack as it's too small." && exit 62 fi info "Install: Extracting downloaded image..." if { tar tf "$PAT"; } >/dev/null 2>&1; then info "Install: Extracting downloaded image..." tar xpf "$PAT" -C "$TMP/." else info "Install: Extracting downloaded image..." export LD_LIBRARY_PATH="/run/extract" if [ "$ARCH" == "amd64" ]; then Loading src/power.sh +2 −1 Original line number Diff line number Diff line Loading @@ -67,9 +67,10 @@ _graceful_shutdown() { if [ "$(cat $QEMU_COUNT)" -ge "$QEMU_TIMEOUT" ]; then echo && error "Shutdown timeout reached, forcefully quitting.." else echo && echo "❯ Quitting..." fi echo && echo "❯ Quitting..." echo 'quit' | nc -q 1 -w 1 localhost "$QEMU_PORT" >/dev/null 2>&1 || true { pkill -f print.sh || true; } 2>/dev/null Loading Loading
src/check.sh +12 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,18 @@ file="/run/dsm.url" location=$(cat "$file") if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then echo "Failed to reach page at http://$location" && exit 1 if [[ "$location" == "20.20"* ]]; then ip="20.20.20.1" port="${location##*:}" echo "Failed to reach DSM at port $port" else echo "Failed to reach DSM at http://$location" ip=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) fi echo "You might need to whitelist IP $ip in the DSM firewall." && exit 1 fi echo "Healthcheck OK" Loading
src/install.sh +3 −3 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ else TMP="/tmp/dsm" SPACE=$(df --output=avail -B 1 /tmp | tail -n 1) if (( MIN_SPACE > SPACE )); then DEV="N" TMP="$STORAGE/tmp" info "Warning: the $FS filesystem of $STORAGE does not support UNIX permissions.." fi Loading Loading @@ -199,15 +200,14 @@ if ((SIZE<250000000)); then error "The specified PAT file is probably an update pack as it's too small." && exit 62 fi info "Install: Extracting downloaded image..." if { tar tf "$PAT"; } >/dev/null 2>&1; then info "Install: Extracting downloaded image..." tar xpf "$PAT" -C "$TMP/." else info "Install: Extracting downloaded image..." export LD_LIBRARY_PATH="/run/extract" if [ "$ARCH" == "amd64" ]; then Loading
src/power.sh +2 −1 Original line number Diff line number Diff line Loading @@ -67,9 +67,10 @@ _graceful_shutdown() { if [ "$(cat $QEMU_COUNT)" -ge "$QEMU_TIMEOUT" ]; then echo && error "Shutdown timeout reached, forcefully quitting.." else echo && echo "❯ Quitting..." fi echo && echo "❯ Quitting..." echo 'quit' | nc -q 1 -w 1 localhost "$QEMU_PORT" >/dev/null 2>&1 || true { pkill -f print.sh || true; } 2>/dev/null Loading