ioemu/sats/main

21 lines
669 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
# (1) Primary init.
#--------------------------------------------------------#
# (1) Get absolute folder #
ROOT=$(dirname `realpath $0`);
ROOT=`dirname $ROOT`;
# (2) Check required arguments
test $# -lt 2 && echo -e "error: too few arguments\n\n\e[1mUSAGE\e[0m\n\tmain <key> <host>\n\n\e[1mARGUMENTS\e[0m\n\t<key>\tThe key of the pool\n\t<host>\tThe host where the pool is hosted\n" && exit 1;
# (3) Store arguments #
POOL_KEY="$1";
POOL_HOST="$2";
# (2) Start server in background (keep PID)
#--------------------------------------------------------#
# (1) Launch master and all deamons #
$ROOT/com/master $POOL_KEY $POOL_HOST 9999 $ROOT/sats/daemon;