diff --git a/run/network.sh b/run/network.sh index 4781009..000d870 100644 --- a/run/network.sh +++ b/run/network.sh @@ -228,24 +228,8 @@ if [[ "${DHCP}" == [Yy1]* ]]; then { pkill -f server.sh || true; } 2>/dev/null - SH_SCRIPT="/run/ipinfo.sh" - - { echo "#!/bin/bash" - echo "INFO=\$(curl -s -m 5 -S http://127.0.0.1:2210/read?command=10 2>/dev/null)" - echo "rest=\${INFO#*http_port}; rest=\${rest#*:}; rest=\${rest%%,*}; PORT=\${rest%%\\\"*}" - echo "rest=\${INFO#*eth0}; rest=\${rest#*ip}; rest=\${rest#*:}; rest=\${rest#*\\\"}; IP=\${rest%%\\\"*}" - echo "BODY=\"The location of DSM is http://\${IP}:\${PORT}\"" - echo "HTML=\"VirtualDSM

\$BODY

\"" - echo "LENGTH=\"\${#HTML}\"; RESPONSE=\"HTTP/1.1 200 OK\\nContent-Length: \${LENGTH}\\nConnection: close\\n\\n\$HTML\"" - echo "echo -e \"\$RESPONSE\"" - } > "$SH_SCRIPT" - - chmod +x "$SH_SCRIPT" - - /run/server.sh 80 "$SH_SCRIPT" & - /run/server.sh 5000 "$SH_SCRIPT" & + /run/server.sh 80 /run/ip.sh & + /run/server.sh 5000 /run/ip.sh & else