Skip to content

Commit a444052

Browse files
authored
chore: add nc timeout (#32)
1 parent 4054be1 commit a444052

File tree

1 file changed

+1
-1
lines changed
  • root/etc/services.d/netcat

1 file changed

+1
-1
lines changed

root/etc/services.d/netcat/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ then
77
while ! nc -z ${DUMP1090_REMOTE_HOST} ${DUMP1090_REMOTE_PORT}; do sleep 5; echo "wait until remote dump1090 (${DUMP1090_REMOTE_HOST}) is listening on port ${DUMP1090_REMOTE_PORT}"; done
88
echo "local and remote dump1090 is available now. Start forwarding..."
99

10-
while /bin/true; do /bin/nc ${DUMP1090_REMOTE_HOST} ${DUMP1090_REMOTE_PORT} | /bin/nc -q1 localhost ${DUMP1090_LOCAL_PORT}; sleep 15; done
10+
while /bin/true; do /bin/nc -q1 -w 15 ${DUMP1090_REMOTE_HOST} ${DUMP1090_REMOTE_PORT} | /bin/nc -q1 -w 15 localhost ${DUMP1090_LOCAL_PORT}; sleep 15; done
1111
else
1212
tail -f /dev/null
1313
fi

0 commit comments

Comments
 (0)