summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/hackvrd/multi.sh
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-04-18 02:38:52 -0500
committerepoch <epoch@thebackupbox.net>2020-04-18 02:38:52 -0500
commit5417ee3aacf64d3b3b164ba2a529daacb101ebb9 (patch)
treeeea6fdd0ef6c378f143341cf141529006bcdb029 /share/hackvr/examples/hackvrd/multi.sh
parente7019fb09653472bb57474638188dcba337f1a3c (diff)
parent459bff40e078a3979573000a903b288bcc9a8d3f (diff)
downloadhackvr-5417ee3aacf64d3b3b164ba2a529daacb101ebb9.tar.gz
hackvr-5417ee3aacf64d3b3b164ba2a529daacb101ebb9.zip
Merge branch 'master' of ssh://lin.thebackupbox.net:65432/~/hackvr
Diffstat (limited to 'share/hackvr/examples/hackvrd/multi.sh')
-rwxr-xr-xshare/hackvr/examples/hackvrd/multi.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/share/hackvr/examples/hackvrd/multi.sh b/share/hackvr/examples/hackvrd/multi.sh
new file mode 100755
index 0000000..525f981
--- /dev/null
+++ b/share/hackvr/examples/hackvrd/multi.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+printf 'user: %s joined multi\n' "$USER" >> /var/log/hackvr.all
+cat /var/cache/hackvr/world_history <(echo 'root export *') \
+ | egrep -v '^#|^[^ ][^ ]* *quit' \
+ | grep -v 'move [a-z]' \
+ | /usr/local/bin/hackvr_headless 2>/dev/null \
+ | sed 's/^root_//g'
+tail -f -n0 /var/cache/hackvr/world_history \
+ | grep --line-buffered -v '^'"$USER"' ' &
+tee -a /var/cache/hackvr/world_history >/dev/null