X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fresources_lite%2Fconfigure.sh;fp=example%2Fdiameter%2Flauncher%2Fresources_lite%2Fconfigure.sh;h=0000000000000000000000000000000000000000;hb=2ddc4abd3627f5f5b4df32de199f364aa3844491;hp=335e4fff27d3c68329bb37f43f135342ebc93c4e;hpb=b5a7dd9cd05eb652f63e10a77dc26af49b9a6ff2;p=anna.git diff --git a/example/diameter/launcher/resources_lite/configure.sh b/example/diameter/launcher/resources_lite/configure.sh deleted file mode 100755 index 335e4ff..0000000 --- a/example/diameter/launcher/resources_lite/configure.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -############# -# VARIABLES # -############# - -# Diameter dictionary: -STD_DICTIONARY=stacks/avps_etsi.xml,stacks/avps_ietf.xml,stacks/avps_tgpp.xml,stacks/commands_baseProtocol.xml -APP_DICTIONARY=stacks/commands_pccPS_EricssonSAPC_se.xml -DICTIONARY=$STD_DICTIONARY,$APP_DICTIONARY -# Perhaps the stack is not fully defined: -KINDNESS=-ignoreErrors - -# Communication endpoints: -LOCAL_STANDARD_ENDPOINT=localhost:3868 -EXAMPLE_ENTITY_4_BALANCER=192.168.12.11:3868,192.168.12.21:3868 -CONNS=10 - -# General -EXE_BN=ADL-launcher - -# Tracing: -TRACING="-cntDir counters" -# need detailed traces ?: -#TRACING="$TRACING -trace debug" - -############# -# FUNCTIONS # -############# - -_exit () { - echo - echo $1 - echo - exit 1 -} - -# $1: process name -createRunScript () { - - cat << EOF > run.sh -#!/bin/bash -cd \`dirname \$0\` -EXE=\`cat .exe 2>/dev/null\` -STARTED=\`pgrep $1 2>/dev/null\` -[ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; } -echo $1 > .exe -0> launcher.traces -# Execution line: -./$@ & -echo \$! > .pid -EOF - - chmod a+x run.sh -} - -# $1: input option (c, s, b, d) -# Retuns the type of launcher logical name for the input option -get_tol () { - [ "$1" = "c" ] && echo client - [ "$1" = "s" ] && echo server - [ "$1" = "b" ] && echo balancer - [ "$1" = "d" ] && echo dummy -} - -############# -# EXECUTION # -############# -cd `dirname $0` -SCR_DIR=`pwd` -echo -echo -echo "Configure a (c)lient, (s)erver, (b)alancer or (d)ummy [c]:" -read option -[ "$option" = "" ] && option=c -tol=$(get_tol $option) -[ "$tol" = "" ] && _exit "Option '$option' not implemented !!" - -# Run script: -EXE_LINK=ADL-$tol -ln -sf $EXE_BN $EXE_LINK - -case $tol in - - client) - ENTITY=$LOCAL_STANDARD_ENDPOINT - createRunScript $EXE_LINK -dictionary $DICTIONARY -entity $ENTITY -entityServerSessions $CONNS -diameterServerSessions 0 $KINDNESS $TRACING & - ;; - - server) - SERVER=$LOCAL_STANDARD_ENDPOINT - createRunScript $EXE_LINK -dictionary $DICTIONARY -diameterServer $SERVER -diameterServerSessions $CONNS -entityServerSessions 0 $KINDNESS $TRACING & - ;; - - balancer) - SERVER=$LOCAL_STANDARD_ENDPOINT - ENTITY=$EXAMPLE_ENTITY_4_BALANCER - createRunScript $EXE_LINK -dictionary $DICTIONARY -entity $ENTITY -entityServerSessions $CONNS -diameterServer $SERVER -diameterServerSessions $CONNS -balance $KINDNESS $TRACING & - ;; - - dummy) - createRunScript $EXE_LINK -dictionary $DICTIONARY -entityServerSessions 0 -diameterServerSessions 0 $KINDNESS $TRACING & - ;; - -esac - -echo "Created 'run.sh' script !" -echo