diff options
-rwxr-xr-x | echoz.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/bin/bash set -euf -thisdir=$(dirname $0) +thisdir="$(dirname $0)" pipename="${XDG_RUNTIME_DIR:-/tmp}/echoz-$$.pipe" jid="$1" password="$2" @@ -12,4 +12,4 @@ 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 +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 |