diff options
author | toni <matzeton@googlemail.com> | 2016-07-23 19:20:02 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-07-23 19:20:02 +0200 |
commit | 43c4ef830b2cdcb8e973a56b552af18f9ac51c76 (patch) | |
tree | 40324f94b621c79918f6800f6a2675b1c1d71ec1 /irssi-tor.sh | |
parent | d89d3bd711823a20b4d15fbec375dc035f998788 (diff) |
upd
Diffstat (limited to 'irssi-tor.sh')
-rwxr-xr-x | irssi-tor.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/irssi-tor.sh b/irssi-tor.sh index b9d2a5b..4116bfb 100755 --- a/irssi-tor.sh +++ b/irssi-tor.sh @@ -17,14 +17,10 @@ IRC_PORT="$2" IRC_NICK="$3" sudo iptables -A INPUT -p tcp '!' -s 127.0.0.1 --dport ${SOC_PORT} -j REJECT -socat -d -d -lmlocal2 TCP4-LISTEN:${SOC_PORT},reuseaddr,fork,range=127.0.0.1/32 SOCKS4A:localhost:${IRC_HOST}:${IRC_PORT},socksport=9050 & +socat TCP4-LISTEN:${SOC_PORT},fork SOCKS4A:localhost:${IRC_HOST}:${IRC_PORT},socksport=9050 & SOC_PID=$! echo "socat pid ${SOC_PID}" -if [ $# -eq 0 ]; then - irssi --noconnect -else - irssi -c localhost -p ${SOC_PORT} -n ${IRC_NICK} -fi +irssi --noconnect echo "kill ${SOC_PID}" kill -SIGTERM ${SOC_PID} 2>/dev/null wait ${SOC_PID} |