Node class, command line redesign. New xml template for process configuration.
[anna.git] / example / diameter / launcher / deployments / advanced / pre-start.sh
index 49a83ff..bb6c7dc 100755 (executable)
@@ -12,15 +12,11 @@ diameterServerSessions_dflt=`cat .diameterServerSessions 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 [ "$httpServer_dflt" != ""  -a "$diameterServer_dflt" != "" -a "$diameterServerSessions_dflt" != "" -a \
-  "$entity_dflt" != ""  -a "$entityServerSessions_dflt" != "" -a \
-  "$dictionary_dflt" != "" ]
+  "$entity_dflt" != ""  -a "$entityServerSessions_dflt" != "" ]
 then
   echo "Do you wish to answer wizard commandline configuration ? (y/n) [n]:"
   read wizard
@@ -34,7 +30,6 @@ fi
 [ "$diameterServerSessions_dflt" = "" ] && diameterServerSessions_dflt=1
 [ "$entity_dflt" = "" ] && entity_dflt="localhost:4000,localhost:4001"
 [ "$entityServerSessions_dflt" = "" ] && entityServerSessions_dflt=0
-[ "$dictionary_dflt" = "" ] && dictionary_dflt=dictionary.xml
 
 
 # Wizard
@@ -42,17 +37,6 @@ echo "HTTP Management interface address (using i.e. curl tool) as <ip|hostname>:
 read httpServer
 [ "$httpServer" = "" ] && httpServer=$httpServer_dflt
 
-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 server:
 echo "Diameter own server available connections (0: diameter server disabled) [$diameterServerSessions_dflt]:"
 read diameterServerSessions
@@ -81,11 +65,13 @@ fi
 
 # Configure:
 echo $httpServer > .httpServer
-echo $dictionary > .dictionary
-echo $diameterServer > .diameterServer
-echo $diameterServerSessions > .diameterServerSessions
-echo $entity > .entity
-echo $entityServerSessions > .entityServerSessions
+
+cat services.msk \
+  | sed 's/_DIAMETER_SERVER_/'$diameterServer'/' \
+  | sed 's/_DIAMETER_SERVER_SESSIONS_/'$diameterServerSessions'/' \
+  | sed 's/_ENTITY_/'$entity'/' \
+  | sed 's/_ENTITY_SERVER_SESSIONS_/'$entityServerSessions'/' \
+> services.xml
 
 echo
 echo