[asterisk-scf-commits] asterisk-scf/examples.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Sep 21 16:59:26 CDT 2011


branch "master" has been updated
       via  93a8f221e09b44aa27facb28d607674beb54e6ca (commit)
      from  58688549bc692e632b5b6e8ac7245c21292bf54c (commit)

Summary of changes:
 configs/start_astscf.sh |   64 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 53 insertions(+), 11 deletions(-)
 mode change 100644 => 100755 configs/start_astscf.sh


- Log -----------------------------------------------------------------
commit 93a8f221e09b44aa27facb28d607674beb54e6ca
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Sep 21 16:59:24 2011 -0500

    Begin fleshing out startup script.

diff --git a/configs/start_astscf.sh b/configs/start_astscf.sh
old mode 100644
new mode 100755
index 5932327..4368436
--- a/configs/start_astscf.sh
+++ b/configs/start_astscf.sh
@@ -1,11 +1,53 @@
-#!/bin/sh
-
-# services to start:
-#   servicediscovery (plus replicator)
-#   logger
-#   mediaformatgeneric
-#   media_operations_core
-#   routing (plus replicator)
-#   bridging (plus replicator)
-#   media_rtp_pjmedia (plus replicator)
-#   sip (plus replicator)
+#!/bin/bash
+
+# arguments:
+
+script="$(basename $0)"
+
+# components[i++]=ServiceDiscovery
+components[i++]=Logger
+components[i++]=MediaFormatGeneric
+components[i++]=MediaOperationsCore
+components[i++]=MediaServiceRTP
+components[i++]=RoutingService
+components[i++]=BridgeManager
+components[i++]=SipService
+
+function usage()
+{
+    cat <<EOF
+usage: ${script}
+EOF
+}
+
+echo "Using Ice from ${ICE_HOME:=/opt/Ice-3.4}"
+echo "Using Asterisk SCF from ${ASTSCF_HOME:=/usr/local}"
+
+mkdir -p logs
+
+export LD_LIBRARY_PATH=${ICE_HOME}/lib:${ICE_HOME}/lib64:${ASTSCF_HOME}/lib:${ASTSCF_HOME}/lib/asterisk-scf/icebox
+
+function start_component()
+{
+# arguments:
+# 1 - component and config file name (friendly)
+    echo "Starting ${1}"
+    ${ICE_HOME}/bin/icebox --Ice.Config=${1}.conf  &>>logs/${1}.log &
+}
+
+while test $# -gt 0; do
+    case ${1} in
+        *)
+            usage >&2
+            exit 1
+            ;;
+    esac
+done
+
+start_component ServiceDiscovery
+sleep 5
+
+for comp in "${components[@]}"
+do
+    start_component "${comp}"
+done

-----------------------------------------------------------------------


-- 
asterisk-scf/examples.git



More information about the asterisk-scf-commits mailing list