all repos — xrxs @ e85bf2c4e5f8c3c2d6e58ea0c8283a78f4b783a7

experimental networked application/game server with 9p

xrxs-srv.sh (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

PORT=5460

case $1 in
  start)
    ./xrxs -s xrxs & sleep 1
    9pserve -c unix!/tmp/ns.$(whoami).\:0/xrxs tcp!0.0.0.0!${PORT} &
    ;;
  stop)
    killall xrxs
    ;;
  *)
    echo "$0 start|stop"
    echo "  start: run the xrxs service in the background"
    echo "  stop:  terminates xrxs services"
    ;;
esac