From 6894e26fc16f9cac90ef5ea6b547618f70b0edc9 Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 18 Apr 2020 07:41:01 +0000 Subject: rearrange radio buttons, use socat instead of ncat for connecting to local hackvr service from the ssh command. fixed a missing "cd" in hackvrd.sh --- share/hackvr/examples/hackvrd/hackvrd.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'share/hackvr/examples/hackvrd/hackvrd.sh') diff --git a/share/hackvr/examples/hackvrd/hackvrd.sh b/share/hackvr/examples/hackvrd/hackvrd.sh index 39054a3..0b16543 100755 --- a/share/hackvr/examples/hackvrd/hackvrd.sh +++ b/share/hackvr/examples/hackvrd/hackvrd.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -o pipefail + OUR_HOST=$(/usr/local/libexec/sockip | head -n1) THEIR_HOST=$(/usr/local/libexec/peerip | head -n1) OUR_PORT=$(/usr/local/libexec/sockip | tail -n1) @@ -25,7 +27,7 @@ wat=true while true;do while read -t 10 group action target args;do - printf "hackvr line: %s\n" "$group $action $target" >> $log + printf "hackvr line: %s\n" "$group $action $target $args" >> $log if [ "$group" = "$USER" -a "$action" = "pong" ];then printf '%s@%s ponged on hackvr\n' $USER $THEIR_HOST >> $log last_pong="$(date +%s)" @@ -47,6 +49,7 @@ while true;do fi if [ $target = "/radio" ];then printf "$USER deleteallexcept $USER\n" + cd /var/hackvr/ ./radio.sh target=/ fi -- cgit v1.2.3