X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fresources%2Fbasic%2Fconfigure.sh;fp=example%2Fdiameter%2Flauncher%2Fresources%2Fbasic%2Fconfigure.sh;h=0000000000000000000000000000000000000000;hb=7bf36f6cec41494071f07699184d8230ccd8cb41;hp=a5d15152e2b8d92082f151e1f59e2e1c370f4636;hpb=08bdffbddf4bc0938eadec51af88de18734beda3;p=anna.git diff --git a/example/diameter/launcher/resources/basic/configure.sh b/example/diameter/launcher/resources/basic/configure.sh deleted file mode 100755 index a5d1515..0000000 --- a/example/diameter/launcher/resources/basic/configure.sh +++ /dev/null @@ -1,109 +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_qosControl.xml -DICTIONARY=$STD_DICTIONARY,$APP_DICTIONARY -# Perhaps the stack is not fully defined: -#KINDNESS=-ignoreErrors -# But we prefer stack to generate Failed-AVP automatically: -KINDNESS= - -# 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\` -STARTED=\`pgrep $1 2>/dev/null\` -[ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; } -0> launcher.traces -rm -f counters/* -# 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