#!/bin/bash
set -ex

# This script file starts up a DistKV single-node runner.

if test ! -v NAME ; then
    echo "NAME is not set. Exiting." >&2
    exit 1
fi

if test $# = 1 ; then
    exec distkv -c /etc/distkv.cfg client run -n "$NAME" -g "$1" all
else
    exec distkv -c /etc/distkv.cfg client run -n "$NAME" all
fi
