From 22278761388d4882341f4a898b1da568a8818aa9 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Tue, 3 Aug 2021 23:21:14 -0600 Subject: [PATCH] added a script to serve/deploy with 9pserve --- xrxs-srv.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 xrxs-srv.sh diff --git a/xrxs-srv.sh b/xrxs-srv.sh new file mode 100755 index 0000000..faf6bd2 --- /dev/null +++ b/xrxs-srv.sh @@ -0,0 +1,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