X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FDEPLOY.sh;h=f1d1538f90c8dd84ee62d351f82c49c6c9e3eca9;hb=6b3c0d5e652726b5034fa595bc020476862c948f;hp=bc76bbdd70d51cee17071ed27f1fc6816642be94;hpb=659d6188ba2150517f42a8a61699b42eb9c5f1c7;p=anna.git diff --git a/example/diameter/launcher/DEPLOY.sh b/example/diameter/launcher/DEPLOY.sh index bc76bbd..f1d1538 100755 --- a/example/diameter/launcher/DEPLOY.sh +++ b/example/diameter/launcher/DEPLOY.sh @@ -20,8 +20,8 @@ createRunScript () { echo "#!/bin/bash" > run.sh echo "EXE=\`cat .exe 2>/dev/null\`" >> run.sh - echo "STARTED=\`ps -fea | grep \"\$EXE\" | grep -v grep\`" >> run.sh - echo "[ \"\$EXE\" != \"\" -a \"\$STARTED\" != \"\" ] && { echo \"Already started!\"; echo \"\$STARTED\" ; exit ; }" >> run.sh + echo "STARTED=\`pgrep \$EXE2>/dev/null\`" >> run.sh + echo "[ \$? -eq 0 ] && { echo \"Already started!\"; echo \"\$STARTED\" ; exit 1 ; }" >> run.sh echo "./pre-start.sh" >> run.sh echo "> launcher.traces" >> run.sh echo "EXE=\"./ADL-launcher\"" >> run.sh @@ -32,6 +32,7 @@ createRunScript () { do echo -n "$i " >> run.sh done + echo -n "-cntDir counters " >> run.sh echo "&" >> run.sh chmod a+x run.sh rm args.txt @@ -71,23 +72,24 @@ 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..." +[ "$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." +[ ! -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." echo echo "Deploy (f)ull version or (l)ite version [l]:" read deploy_type -[[ "$deploy_type" = "" ]] && deploy_type=l -[[ "$deploy_type" = "l" ]] && RESOURCES_DIR=resources_lite +[ "$deploy_type" = "" ] && deploy_type=l +[ "$deploy_type" = "l" ] && RESOURCES_DIR=resources_lite echo "Copying ..." mkdir -p $DPATH mkdir -p $DPATH/stacks mkdir -p $DPATH/DTDs +mkdir -p $DPATH/counters cp $EXEC $DPATH/ADL-launcher cp -r $RESOURCES_DIR/* $DPATH cp $SETUPS_DIR/*xml $DPATH/stacks @@ -98,7 +100,7 @@ cp $DCTDTD $DPATH/DTDs echo "Preparing ..." cd $DPATH -[[ "$deploy_type" != "l" ]] && createRunScript +[ "$deploy_type" != "l" ] && createRunScript createDictionaryPaths cd - >/dev/null