X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Finit.d%2Fsfa;h=08975dc7adbaaa5039981b415adbd60de2c62dc4;hb=3961165f3cbf33b0b154db3140398e0ed383acbd;hp=b3b041ca80e45a823e519581dae71aa01a705ca1;hpb=b524527c6e612616de0fc7dfc07bae11dd82fa13;p=sfa.git diff --git a/sfa/init.d/sfa b/sfa/init.d/sfa index b3b041ca..08975dc7 100755 --- a/sfa/init.d/sfa +++ b/sfa/init.d/sfa @@ -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,28 +61,35 @@ start() { reload - if [ "$SFA_REGISTRY_ENABLED" ]; then - action $"SFA Registry" daemon /usr/bin/sfa-server.py -r -d $OPTIONS + # install peer certs + action $"SFA installing peer certs" daemon /usr/bin/sfa-start.py -t -d $OPTIONS + + if [ "$SFA_REGISTRY_ENABLED" -eq 1 ]; then + action $"SFA Registry" daemon /usr/bin/sfa-start.py -r -d $OPTIONS fi - if [ "$SFA_AGGREGATE_ENABLED" ]; then - action $"SFA Aggregate" daemon /usr/bin/sfa-server.py -a -d $OPTIONS + if [ "$SFA_AGGREGATE_ENABLED" -eq 1 ]; then + action $"SFA Aggregate" daemon /usr/bin/sfa-start.py -a -d $OPTIONS fi - if [ "$SFA_SM_ENABLED" ]; then - action "SFA SliceMgr" daemon /usr/bin/sfa-server.py -s -d $OPTIONS + if [ "$SFA_SM_ENABLED" -eq 1 ]; then + action "SFA SliceMgr" daemon /usr/bin/sfa-start.py -s -d $OPTIONS + fi + + if [ "$SFA_FLASHPOLICY_ENABLED" -eq 1 ]; then + action "Flash Policy Server" daemon /usr/bin/sfa_flashpolicy.py --file="$SFA_FLASHPOLICY_CONFIG_FILE" --port=$SFA_FLASHPOLICY_PORT -d fi RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sfa + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sfa-start.py } stop() { - action $"Shutting down SFA" killproc sfa-server.py + action $"Shutting down SFA" killproc sfa-start.py RETVAL=$? - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sfa + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sfa-start.py } @@ -94,13 +99,13 @@ case "$1" in reload) reload force ;; restart) stop; start ;; condrestart) - if [ -f /var/lock/subsys/sfa ]; then + if [ -f /var/lock/subsys/sfa-start.py ]; then stop start fi ;; status) - status sfa + status sfa-start.py RETVAL=$? ;; *)