Merge branch 'master' of ssh://git.f-lab.fr/git/sfa
[sfa.git] / sfa / init.d / sfa
index e4b8fec..e2fdb10 100755 (executable)
@@ -2,13 +2,11 @@
 #
 # sfa   Wraps PLCAPI into the SFA compliant API
 #
-# chkconfig: 2345 5 99
+# hopefully right after plc
+# chkconfig: 2345 61 39
 #
 # description:   Wraps PLCAPI into the SFA compliant API
 #
-# $Id$
-# $URL$
-#
 
 # Source config
 [ -f /etc/sfa/sfa_config ] && . /etc/sfa/sfa_config
@@ -63,15 +61,18 @@ start() {
     
     reload
 
-    if [ "$SFA_REGISTRY_ENABLED" ]; then
+    # install peer certs
+    action $"SFA installing peer certs" daemon /usr/bin/sfa-server.py -t -d $OPTIONS 
+
+    if [ "$SFA_REGISTRY_ENABLED" -eq 1 ]; then
         action $"SFA Registry" daemon /usr/bin/sfa-server.py -r -d $OPTIONS
     fi
 
-    if [ "$SFA_AGGREGATE_ENABLED" ]; then
+    if [ "$SFA_AGGREGATE_ENABLED" -eq 1 ]; then
         action $"SFA Aggregate" daemon /usr/bin/sfa-server.py -a -d $OPTIONS
     fi
         
-    if [ "$SFA_SM_ENABLED" ]; then
+    if [ "$SFA_SM_ENABLED" -eq 1 ]; then
         action "SFA SliceMgr" daemon /usr/bin/sfa-server.py -s -d $OPTIONS
     fi