From d12bfe2cb7e3f0d490136b2fc772a21ec806368f Mon Sep 17 00:00:00 2001 From: "Bertrand Jacquin (Beber)" Date: Mon, 23 Jan 2006 15:37:04 +0100 Subject: Quit when ^C and not when connection closed --- sh/nc_serv.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sh/nc_serv.sh b/sh/nc_serv.sh index ddf105f..a9cab32 100755 --- a/sh/nc_serv.sh +++ b/sh/nc_serv.sh @@ -1,8 +1,9 @@ #!/bin/sh -while true -do +ret=0 +while [ $ret -eq 0 ]; do nc -l -p 6667 + ret=$? echo "Connection closed" - echo "--------------------------------------------------------------------------------------------" + echo "--------------------------------------------------------------------------------------------" done -- cgit v1.2.3