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 ; }
41 ./\$EXE -cntDir counters $(for i in `cat args.txt | grep -v "^#"`; do echo -n "$i "; done)&
49 createDictionaryPaths () {
50 for i in stacks/*commands*xml
52 stacks/dependence.sh $i >/dev/null
54 if test "$stack" != "$BASE_PROT"
56 > .dictionary__${stack}
57 for j in `cat ${i}.dep`
59 echo -n "${j}," >> .dictionary__${stack}
61 echo "stacks/$BASE_PROT,stacks/${stack}" >> .dictionary__${stack}
66 ln -s .dictionary__commands_qosControl.xml .dictionary
77 echo "---------------------------------------"
78 echo "Anna Diameter Launcher (ADL) deployment"
79 echo "---------------------------------------"
81 echo "Input deployment path [$DPATH_dflt]:"
83 [ "$DPATH" = "" ] && DPATH=$DPATH_dflt
84 [ -d $DPATH ] && _exit "The path '$DPATH' already exists. Remove it before continue..."
86 echo "Basic checkings ..."
87 [ ! -f $EXEC ] && _exit "Anna Diameter Launcher (ADL) is not linked. Execute 'scons' for 'anna' suite."
88 [ ! -d $SETUPS_DIR ] && _exit "Diameter stacks not found ($SETUPS_DIR). Perhaps you executed this script out of its parent path."
91 echo "Deploy one of these versions:"
93 echo " (a)dvanced version: includes burst management script and templates for different scenarios. Automatic configuration during start."
94 echo " (b)asic version: 4 types of launcher (client, server, balancer, dummy), lightly configured and managed through SIGURS2 method."
95 echo " (f)unction test client: special client with regexp scheduler script based on splitted traffic logs."
97 echo "Input option [b]:"
99 [ "$option" = "" ] && option=b
102 RESOURCES_DIR=resources/advanced
106 RESOURCES_DIR=resources/basic
110 RESOURCES_DIR=resources/ft-client
114 _exit "Unknown option !!"
120 mkdir -p $DPATH/stacks
122 mkdir -p $DPATH/counters
123 cp $EXEC $DPATH/ADL-launcher
124 cp -rL $RESOURCES_DIR/* $DPATH
125 cp $SETUPS_DIR/*xml $DPATH/stacks
126 cp $SETUPS_DIR/*sh $DPATH/stacks
127 cp $SETUPS_DIR/readme.txt $DPATH/stacks
128 cp $MSGDTD $DPATH/DTDs
129 cp $DCTDTD $DPATH/DTDs
133 createRunScript $option
134 createDictionaryPaths
139 echo "Go to '$DPATH' and see README file"