diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-11-16 22:18:29 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-11-16 22:18:29 +0100 |
commit | e095541652336559edb76854950f474f8aa86999 (patch) | |
tree | c5ec2c0c832ff5b28f6a4a340c65ec9945f05358 /src/hub/test-srv-single | |
parent | server shutdown is a little better now (still needs some thoughts though) (diff) | |
parent | pipe client connections can now be killed on shutdown (diff) |
Merge branch 'clean-shutdown'
Diffstat (limited to 'src/hub/test-srv-single')
-rwxr-xr-x | src/hub/test-srv-single | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/hub/test-srv-single b/src/hub/test-srv-single new file mode 100755 index 0000000..902c78b --- /dev/null +++ b/src/hub/test-srv-single @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 <db-name> <interface>" + exit 1 +fi + +TEST_D="./test" +TEST_DB="$TEST_D/$1.bolt" + +mkdir -p "$TEST_D" +rm -f "$TEST_D/pipe" "$TEST_D/pipegram" +case "$2" in + pipe) + exec ./bin/sfive-hub -db "$TEST_DB" -start-pipe-server -pipe "$TEST_D/pipe" -start-pipegram-server=false -start-web-server=false + ;; + pipegram) + exec ./bin/sfive-hub -db "$TEST_DB" -start-pipe-server=false -start-pipegram-server -pipegram "$TEST_D/pipegram" -start-web-server=false + ;; + web) + exec ./bin/sfive-hub -db "$TEST_DB" -start-pipe-server=false -start-pipegram-server=false -start-web-server -web ":8000" + ;; + *) + "unknown interface $2" + return 1 + ;; +esac |