From 869cdb3672ab86342944c0c7b915804ed46225c3 Mon Sep 17 00:00:00 2001 From: SnR <57704319+mitkolazov@users.noreply.github.com> Date: Thu, 4 Apr 2024 05:23:47 +0300 Subject: [PATCH] Removing the -p from the "nc" command. (#697) Removing the -p from the "nc" command. Reason: # nc -w 4 -l -p 80 nc: cannot use -p and -l Without -p it works just fine. > -l' Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are ignored. --- discourse-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discourse-setup b/discourse-setup index d279949..58f656d 100755 --- a/discourse-setup +++ b/discourse-setup @@ -60,7 +60,7 @@ connect_to_port () { esac done else - echo -e "HTTP/1.1 200 OK\n\n $VERIFY" | nc -w 4 -l -p $PORT >/dev/null 2>&1 & + echo -e "HTTP/1.1 200 OK\n\n $VERIFY" | nc -w 4 -l $PORT >/dev/null 2>&1 & if curl --proto =http -s $HOST:$PORT --connect-timeout 3 | grep $VERIFY >/dev/null 2>&1; then return 0 else -- 2.25.1