aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 15:37:04 +0100
committerBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 15:37:04 +0100
commitd12bfe2cb7e3f0d490136b2fc772a21ec806368f (patch)
tree500d22c7bf8d411ba6ed1b14bfc81eaf6b0ed99d
parentMore back to home (diff)
downloadespik-d12bfe2cb7e3f0d490136b2fc772a21ec806368f.tar.xz
Quit when ^C and not when connection closed
-rwxr-xr-xsh/nc_serv.sh7
1 files 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