diff options
Diffstat (limited to 'echoz.sh')
-rwxr-xr-x | echoz.sh | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -10,6 +10,18 @@ srv="$( ( dig +short SRV "_xmpp-client._tcp.$domain" || echo "0 0 5222 $domain" host="$(echo "$srv" | cut -d' ' -f4)" port="$(echo "$srv" | cut -d' ' -f3)" authstr="$(echo -ne "\0$username\0$password" | base64)" -rm -f $pipename -mkfifo $pipename -stdbuf -i0 -o0 openssl s_client -starttls xmpp -xmpphost $domain -connect $host:$port -quiet < $pipename | (echo -ne "$jid $authstr\n"; stdbuf -o0 tr '>\n' '\n\001') | stdbuf -o0 "$thisdir/echoz.sed" | stdbuf -o0 tr -d '\n' | stdbuf -o0 tr '\001' '\n' > $pipename +rm -f "$pipename" +mkfifo "$pipename" +stdbuf -i0 -o0 \ + openssl s_client \ + -starttls xmpp \ + -xmpphost "$domain" \ + -connect "$host:$port" \ + -quiet \ + < "$pipename" \ + | (echo -ne "$jid $authstr\n"; \ + stdbuf -o0 tr '>\n' '\n\001') \ + | stdbuf -o0 "$thisdir/echoz.sed" \ + | stdbuf -o0 tr -d '\n' \ + | stdbuf -o0 tr '\001' '\n' \ + > "$pipename" |