6 SETUPS_DIR=../../../source/diameter/stack/setups
7 MSGDTD=../../../include/anna/diameter/codec/message.dtd
8 DCTDTD=../../../include/anna/diameter/stack/dictionary.dtd
9 BASE_PROT=commands_baseProtocol.xml
10 EXEC=./debug/example_diameter_launcher
26 # Basic launcher 'run.sh' will be created at deployment configuration:
27 [ "$1" = "b" ] && return
28 [ "$1" = "a" ] && exe=ADL-launcher
29 [ "$1" = "f" ] && { exe=ADL-ftclient ; ln -s ADL-launcher $exe ; }
35 STARTED=\`pgrep \$EXE 2>/dev/null\`
36 [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
40 ./\$EXE -cntDir counters $(for i in `cat args.txt | grep -v "^#"`; do echo -n "$i "; done)&
48 createDictionaryPaths () {
49 for i in stacks/*commands*xml
51 stacks/dependence.sh $i >/dev/null
53 if test "$stack" != "$BASE_PROT"
55 > .dictionary__${stack}
56 for j in `cat ${i}.dep`
58 echo -n "${j}," >> .dictionary__${stack}
60 echo "stacks/$BASE_PROT,stacks/${stack}" >> .dictionary__${stack}
65 ln -s .dictionary__commands_qosControl.xml .dictionary
76 echo "---------------------------------------"
77 echo "Anna Diameter Launcher (ADL) deployment"
78 echo "---------------------------------------"
80 echo "Input deployment path [$DPATH_dflt]:"
82 [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
83 [ -d $DPATH ] && _exit "The path '$DPATH' already exists. Remove it before continue..."
85 echo "Basic checkings ..."
86 [ ! -f $EXEC ] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite."
87 [ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR). Perhaps you executed this script out of its parent path."
90 echo "Deploy one of these versions:"
92 echo " (a)dvanced version: includes burst management script and templates for different scenarios. Automatic configuration during start."
93 echo " (b)asic version: 4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
94 echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs."
96 echo "Input option [b]:"
98 [ "$option" = "" ] && option=b
101 RESOURCES_DIR=resources/advanced
105 RESOURCES_DIR=resources/basic
109 RESOURCES_DIR=resources/ft-client
113 _exit "Unknown option !!"
119 mkdir -p $DPATH/stacks
121 mkdir -p $DPATH/counters
122 cp $EXEC $DPATH/ADL-launcher
123 cp -rL $RESOURCES_DIR/* $DPATH
124 cp $SETUPS_DIR/*xml $DPATH/stacks
125 cp $SETUPS_DIR/*sh $DPATH/stacks
126 cp $SETUPS_DIR/readme.txt $DPATH/stacks
127 cp $MSGDTD $DPATH/DTDs
128 cp $DCTDTD $DPATH/DTDs
132 createRunScript $option
133 createDictionaryPaths
138 echo "Go to '$DPATH' and see README file"