mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Always listen on port 80
This commit is contained in:
parent
daad343eec
commit
34ded91c12
@ -33,9 +33,12 @@ if [[ "$2" != "/"* ]]; then
|
||||
HTML=$(html "$BODY")
|
||||
printf '%b' "HTTP/1.1 200 OK\nContent-Length: ${#HTML}\nConnection: close\n\n$HTML" > "$TMP_FILE"
|
||||
|
||||
socat TCP4-LISTEN:80,reuseaddr,fork,crlf SYSTEM:"cat ${TMP_FILE}" 2> /dev/null &
|
||||
socat TCP4-LISTEN:"${1:-5000}",reuseaddr,fork,crlf SYSTEM:"cat ${TMP_FILE}" 2> /dev/null & wait $!
|
||||
|
||||
else
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$2" != "/run/ip.sh" ]]; then
|
||||
|
||||
@ -60,6 +63,6 @@ else
|
||||
fi
|
||||
|
||||
chmod +x "$TMP_FILE"
|
||||
socat TCP4-LISTEN:"${1:-5000}",reuseaddr,fork,crlf SYSTEM:"$TMP_FILE" 2> /dev/null & wait $!
|
||||
|
||||
fi
|
||||
socat TCP4-LISTEN:80,reuseaddr,fork,crlf SYSTEM:"$TMP_FILE" 2> /dev/null &
|
||||
socat TCP4-LISTEN:"${1:-5000}",reuseaddr,fork,crlf SYSTEM:"$TMP_FILE" 2> /dev/null & wait $!
|
||||
|
Loading…
x
Reference in New Issue
Block a user