Loading src/check.sh +3 −1 Original line number Diff line number Diff line #!/usr/bin/env bash set -Eeuo pipefail : ${VM_NET_DEV:='eth0'} [ ! -f "/run/qemu.pid" ] && echo "QEMU not running yet.." && exit 0 [ -f "/run/qemu.count" ] && echo "QEMU is shutting down.." && exit 1 Loading @@ -17,7 +19,7 @@ if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then 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/) ip=$(ip address show dev "$VM_NET_DEV" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) fi echo "You might need to whitelist IP $ip in the DSM firewall." && exit 1 Loading src/print.sh +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ set -Eeuo pipefail : ${DHCP:='N'} : ${VM_NET_DEV:='eth0'} info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n" >&2; } error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; } Loading Loading @@ -67,7 +68,7 @@ if [[ "$location" != "20.20"* ]]; then else ip=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) ip=$(ip address show dev "$VM_NET_DEV" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) port="${location##*:}" if [[ "$ip" == "172."* ]]; then Loading Loading
src/check.sh +3 −1 Original line number Diff line number Diff line #!/usr/bin/env bash set -Eeuo pipefail : ${VM_NET_DEV:='eth0'} [ ! -f "/run/qemu.pid" ] && echo "QEMU not running yet.." && exit 0 [ -f "/run/qemu.count" ] && echo "QEMU is shutting down.." && exit 1 Loading @@ -17,7 +19,7 @@ if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then 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/) ip=$(ip address show dev "$VM_NET_DEV" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) fi echo "You might need to whitelist IP $ip in the DSM firewall." && exit 1 Loading
src/print.sh +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ set -Eeuo pipefail : ${DHCP:='N'} : ${VM_NET_DEV:='eth0'} info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n" >&2; } error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; } Loading Loading @@ -67,7 +68,7 @@ if [[ "$location" != "20.20"* ]]; then else ip=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) ip=$(ip address show dev "$VM_NET_DEV" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) port="${location##*:}" if [[ "$ip" == "172."* ]]; then Loading