From 1d5467962d8137c15b153016dff36a4c036d6c81 Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Sun, 9 Jun 2013 00:25:22 +0200 Subject: [PATCH] Cutdown on settings Change-Id: I5c062fcf9fef5847a4ff693c598308decb58c857 --- tools/control.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/tools/control.sh b/tools/control.sh index 5268a2b..9fc53e6 100755 --- a/tools/control.sh +++ b/tools/control.sh @@ -10,16 +10,13 @@ XTRACE=$(set +o | grep xtrace) set -x # Keep track of this directory -TOOL_DIR=$(cd $(dirname "$0") && pwd) -TOP_DIR=$TOOL_DIR/.. +SCRIPT_DIR=$(cd $(dirname "$0") && pwd) +BASE_DIR=${BASE_DIR:-$SCRIPT_DIR/..} -RUN_DIR=$TOP_DIR/run +SCREEN_NAME=${SCREEN_NAME:-billingstack} +SCREEN_LOGDIR=${SCREEN_LOGDIR:-$BASE_DIR/logs} -SCREEN_NAME=billingstack -SCREEN_LOGDIR=$RUN_DIR - -CONF_DIR=$TOP_DIR/etc/billingstack -CONFIG=${CONFIG:-$CONF_DIR/billingstack.conf} +CONFIG=${CONFIG:-$BASE_DIR/etc/billingstack.conf} SERVICES="api,central,rater,biller,collector" @@ -95,7 +92,7 @@ function run_process() { # screen_it service "command-line" function screen_it { SCREEN_NAME=${SCREEN_NAME:-stack} - SERVICE_DIR=${SERVICE_DIR:-${RUN_DIR}/status} + SERVICE_DIR=${SERVICE_DIR:-$BASE_DIR/status} USE_SCREEN=$(trueorfalse True $USE_SCREEN) if is_service_enabled $1; then @@ -199,11 +196,6 @@ function screen_destroy() { } -function prereq_setup() { - ensure_dir $RUN_DIR -} - - function start_svc() { svc="$(echo "$1" | sed 's/bs-//')" echo "Starting service: $svc"