summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/hackvrd/hackvrd.sh
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-04-18 07:41:01 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-04-18 07:41:01 +0000
commit6894e26fc16f9cac90ef5ea6b547618f70b0edc9 (patch)
treeef85bd33feff07692737fe55aa23338ef7ecea72 /share/hackvr/examples/hackvrd/hackvrd.sh
parent459bff40e078a3979573000a903b288bcc9a8d3f (diff)
downloadhackvr-6894e26fc16f9cac90ef5ea6b547618f70b0edc9.tar.gz
hackvr-6894e26fc16f9cac90ef5ea6b547618f70b0edc9.zip
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
Diffstat (limited to 'share/hackvr/examples/hackvrd/hackvrd.sh')
-rwxr-xr-xshare/hackvr/examples/hackvrd/hackvrd.sh5
1 files changed, 4 insertions, 1 deletions
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