X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FDEPLOY.sh;h=76ccd8bd2a242883e2ceb9c7ed44e6f3ec11f0da;hb=2bbb5ef5ed8fc5997d9c9a973860ca8aae769ad5;hp=d3725d351e339688f384b8fa9fd8fd9e0e4e74e8;hpb=2ddc4abd3627f5f5b4df32de199f364aa3844491;p=anna.git diff --git a/example/diameter/launcher/DEPLOY.sh b/example/diameter/launcher/DEPLOY.sh index d3725d3..76ccd8b 100755 --- a/example/diameter/launcher/DEPLOY.sh +++ b/example/diameter/launcher/DEPLOY.sh @@ -8,7 +8,6 @@ MSGDTD=../../../include/anna/diameter/codec/message.dtd DCTDTD=../../../include/anna/diameter/stack/dictionary.dtd BASE_PROT=commands_baseProtocol.xml EXEC=./debug/example_diameter_launcher -DPATH_dflt=$HOME/ADL ############# # FUNCTIONS # @@ -36,6 +35,7 @@ STARTED=\`pgrep \$EXE 2>/dev/null\` [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; } ./pre-start.sh 0> launcher.traces +rm -f counters/* # Execution line: ./\$EXE -cntDir counters $(for i in `cat args.txt | grep -v "^#"`; do echo -n "$i "; done)& echo \$! > .pid @@ -77,14 +77,9 @@ echo "---------------------------------------" echo "Anna Diameter Launcher (ADL) deployment" echo "---------------------------------------" echo -echo "Input deployment path [$DPATH_dflt]:" -read DPATH -[ "$DPATH" = "" ] && DPATH=$DPATH_dflt -[ -d $DPATH ] && _exit "The path '$DPATH' already exists. Remove it before continue..." - echo "Basic checkings ..." [ ! -f $EXEC ] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite." -[ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR). Perhaps you executed this script out of its parent path." +[ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR)." echo echo "Deploy one of these versions:" @@ -98,15 +93,18 @@ read option [ "$option" = "" ] && option=b case $option in a) - RESOURCES_DIR=resources/advanced + DEPLOYMENTS_DIR=deployments/advanced + DPATH_dflt=$HOME/ADL-advanced ;; b) - RESOURCES_DIR=resources/basic + DEPLOYMENTS_DIR=deployments/basic + DPATH_dflt=$HOME/ADL-basic ;; f) - RESOURCES_DIR=resources/ft-client + DEPLOYMENTS_DIR=deployments/ft-client + DPATH_dflt=$HOME/ADL-ft-client ;; *) @@ -114,13 +112,21 @@ case $option in ;; esac +echo +echo "Input deployment path [$DPATH_dflt]:" +read DPATH +[ "$DPATH" = "" ] && DPATH=$DPATH_dflt +[ -d $DPATH ] && _exit "The path '$DPATH' already exists. Remove it before continue..." + echo "Copying ..." mkdir -p $DPATH mkdir -p $DPATH/stacks mkdir -p $DPATH/DTDs mkdir -p $DPATH/counters +mkdir -p $DPATH/resources cp $EXEC $DPATH/ADL-launcher -cp -rL $RESOURCES_DIR/* $DPATH +cp -rL $DEPLOYMENTS_DIR/* $DPATH +cp resources/* $DPATH/resources cp $SETUPS_DIR/*xml $DPATH/stacks cp $SETUPS_DIR/*sh $DPATH/stacks cp $SETUPS_DIR/readme.txt $DPATH/stacks