Better functionality for start
Change-Id: I9651efe4362d51632193fa046644a53077d8a5d0
This commit is contained in:
parent
2dc89d3997
commit
048f6a0841
|
@ -21,6 +21,7 @@ SCREEN_LOGDIR=$RUN_DIR
|
|||
CONF_DIR=$TOP_DIR/etc/billingstack
|
||||
CONFIG=${CONFIG:-$CONF_DIR/billingstack.conf}
|
||||
|
||||
SERVICES="api,central,rater,biller,collector"
|
||||
|
||||
function ensure_dir() {
|
||||
local dir=$1
|
||||
|
@ -204,14 +205,32 @@ function prereq_setup() {
|
|||
}
|
||||
|
||||
|
||||
function start_svc() {
|
||||
svc="$(echo "$svc" | sed 's/bs-//')"
|
||||
screen_it bs-$svc "billingstack-$svc --config-file $CONFIG"
|
||||
}
|
||||
|
||||
|
||||
function start() {
|
||||
local svc=$1
|
||||
[ "$svc" == 'all' ] && {
|
||||
for s in $SERVICES; do
|
||||
start_svc $s
|
||||
done
|
||||
return
|
||||
}
|
||||
start_svc $svc
|
||||
}
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
prereq_setup
|
||||
screen_setup
|
||||
screen_it bs-central "$TOOL_DIR/with_venv.sh billingstack-central --config-file $CONFIG"
|
||||
screen_it bs-api "$TOOL_DIR/with_venv.sh billingstack-api --config-file $CONFIG"
|
||||
|
||||
start $2
|
||||
;;
|
||||
stop)
|
||||
screen_destroy
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue