3 # sfa Wraps PLCAPI into the SFA compliant API
7 # description: Wraps PLCAPI into the SFA compliant API
13 # recompute /etc/sfa/sfa_config from the xml files
14 # not too sure this is the right place, should probably be done by sfa-config-tty..
15 xml_files="/etc/sfa/default_config.xml"
16 [ -f /etc/sfa/configs/site.xml ] && xml_files="$xml_files /etc/sfa/configs/site.xml"
17 plc-config --shell $xml_files > /etc/sfa/sfa_config
18 plc-config --python $xml_files > /etc/sfa/sfa_config.py
23 # source function library
24 . /etc/init.d/functions
28 echo -n $"Starting SFA: "
30 if [ "$SFA_REGISTRY_ENABLED" ]; then
32 daemon /usr/bin/sfa-server.py -r -d $OPTIONS
35 if [ "$SFA_AGGREGATE_ENABLED" ]; then
37 daemon /usr/bin/sfa-server.py -a -d $OPTIONS
40 if [ "$SFA_SM_ENABLED" ]; then
42 daemon /usr/bin/sfa-server.py -s -d $OPTIONS
47 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sfa
52 echo -n $"Shutting down SFA: "
53 killproc sfa-server.py
57 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sfa
74 if [ -f /var/lock/subsys/sfa ]; then
84 echo $"Usage: $0 {start|stop|restart|condrestart|status}"