27 STARTED=\`pgrep $1$ 2>/dev/null\`
28 [ \$? -eq 0 ] && { echo "Already started!"; echo "\$STARTED" ; exit 1 ; }
30 rm -f counters/* test-reports/*
32 export LD_LIBRARY_PATH=\$PWD/dynlibs
33 ./$@ --services services.xml &
40 # $1: input option (c, s, b, d)
41 # Retuns the type of launcher logical name for the input option
43 [ "$1" = "c" ] && echo client
44 [ "$1" = "s" ] && echo server
45 [ "$1" = "b" ] && echo balancer
46 [ "$1" = "d" ] && echo dummy
56 echo "Configure a (c)lient, (s)erver, (b)alancer or (d)ummy [c]:"
58 [ "$option" = "" ] && option=c
59 tol=$(get_tol $option)
60 [ "$tol" = "" ] && _exit "Option '$option' not implemented !!"
63 ln -sf services/${tol}.xml services.xml
66 DEBUG="--cntDir counters --tmDir test-reports"
68 echo "Enable debug traces ? (y/n) [n]:"
70 [ "$enable" = "" ] && enable=n
71 [ "$enable" = "y" ] && DEBUG="$DEBUG --trace debug"
76 echo "Strict xml for decoded messages ? (y/n) [y]:"
77 echo " (ignoring flags turns a made-up xml representation; execute './$EXE_BN | grep -A1 ignoreFlags:' for more help)"
79 [ "$strict" = "" ] && strict=y
80 [ "$strict" = "n" ] && KINDNESS="--ignoreFlags"
81 if [ "$option" = "s" ]
84 echo "Ignore errors ? (y/n) [n]:"
85 echo " (ignoring errors, the process won't answer Failed-AVP automatically; execute './$EXE_BN | grep -A1 ignoreErrors:' for more help)"
87 [ "$i_errors" = "" ] && i_errors=n
88 [ "$i_errors" = "y" ] && KINDNESS="$KINDNESS --ignoreErrors"
92 EXE_LINK=`basename $PWD`
93 [ "$EXE_BN" != "$EXE_LINK" ] && ln -sf $EXE_BN $EXE_LINK
98 ENTITY=$LOCAL_STANDARD_ENDPOINT
99 createRunScript $EXE_LINK $KINDNESS $DEBUG &
103 SERVER=$LOCAL_STANDARD_ENDPOINT
104 createRunScript $EXE_LINK $KINDNESS $DEBUG &
108 SERVER=$LOCAL_STANDARD_ENDPOINT
109 ENTITY=$EXAMPLE_ENTITY_4_BALANCER
110 createRunScript $EXE_LINK $KINDNESS $DEBUG &
114 createRunScript $EXE_LINK $KINDNESS $DEBUG &
120 echo "Created 'run.sh' script !"