]> Pileus Git - ~andy/rhawk/commitdiff
Add TCP keep alive options
authorAndy Spencer <andy753421@gmail.com>
Sat, 6 Apr 2013 04:38:48 +0000 (04:38 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 6 Apr 2013 04:38:48 +0000 (04:38 +0000)
This should cause the connection to disconnect after a network outage.

rhawk.sh

index e0e0dd1fa7cae4b7544d325246450c67632cd496..3a2d6f1b6a36c9dccde8cad4d7d2cac69e9c5b32 100755 (executable)
--- a/rhawk.sh
+++ b/rhawk.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
+KEEPALIVE="keepalive,keepidle=240,keepcnt=1,keepintvl=1"
 cd /home/andy/src/rhawk
 while true; do
-       socat TCP:'irc.freenode.net:6667' EXEC:'awk -f rhawk'
+       socat TCP:"irc.freenode.net:6667,$KEEPALIVE" EXEC:"awk -f rhawk"
        sleep 30
 done