diff options
author | Christian Pointner <equinox@spreadspace.org> | 2017-07-14 01:19:07 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2017-07-14 01:19:07 +0200 |
commit | f67e238d3a0f96affad921d19d8f469153287b70 (patch) | |
tree | f8e298864fc05b042adf97c3f416bd849abd02a0 /src/hub/test-srv-single | |
parent | added (stupid) shutdown for pipe interface (diff) |
interface shutdown almost clean now
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 |