Node class, command line redesign. New xml template for process configuration.
[anna.git] / example / diameter / launcher / deployments / ft-client / pre-start.sh
index a01d1f0..2ed08c4 100755 (executable)
@@ -7,13 +7,10 @@ rm *.log* *.csv 2>/dev/null
 entity_dflt=`cat .entity 2>/dev/null`
 entityServerSessions_dflt=`cat .entityServerSessions 2>/dev/null`
 
-# Stack:
-dictionary_dflt=`cat .dictionary 2>/dev/null`
-
 echo
 echo
 # If all have values:
-if [ "$entity_dflt" != ""  -a "$entityServerSessions_dflt" != "" -a "$dictionary_dflt" != "" ]
+if [ "$entity_dflt" != ""  -a "$entityServerSessions_dflt" != "" ]
 then
   echo "Do you wish to answer wizard commandline configuration ? (y/n) [n]:"
   read wizard
@@ -25,20 +22,8 @@ fi
 #[ "$entity_dflt" = "" ] && entity_dflt="192.168.12.11:3868,192.168.12.21:3868"
 [ "$entity_dflt" = "" ] && entity_dflt="localhost:3868"
 [ "$entityServerSessions_dflt" = "" ] && entityServerSessions_dflt=1
-[ "$dictionary_dflt" = "" ] && dictionary_dflt=dictionary.xml
-
 
 # Wizard
-echo "Diameter dictionary: you could use '/opt/bin/anna/example_diameter_stackManagement' tool in order to build"
-echo " autonomous dictionaries for any kind of application. The key is to concatenate xml contents (ietf, 3gpp,"
-echo " vendor-specific, etc.). See 'example/diameter/stackManagement/self_ruling_setups.sh' for this."
-echo
-echo "This launcher can also join them providing a comma-separated list (dictionaries available on ./stack)."
-echo "By default, a QoS Application setup is suggested. Input the desired configuration instead, or press ENTER:"
-echo
-echo " [$dictionary_dflt]:"
-read dictionary
-[ "$dictionary" = "" ] && dictionary=$dictionary_dflt
 
 # As client:
 echo "Diameter entity server sessions (0: diameter entity disabled) [$entityServerSessions_dflt]:"
@@ -54,9 +39,10 @@ fi
 [ "$entity" = "" ] && entity="$entity_dflt"
 
 # Configure:
-echo $dictionary > .dictionary
-echo $entity > .entity
-echo $entityServerSessions > .entityServerSessions
+cat services.msk \
+  | sed 's/_ENTITY_/'$entity'/' \
+  | sed 's/_ENTITY_SERVER_SESSIONS_/'$entityServerSessions'/' \
+> services.xml
 
 echo
 echo