#
# description: Wraps PLCAPI into the SFA compliant API
#
-# $Id: sfa 14304 2009-07-06 20:19:51Z thierry $
-# $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/init.d/sfa $
-#
# Source config
. /etc/sfa/sfa_config
# source function library
. /etc/init.d/functions
+init_key() {
+ # if key doesnt exist use sfa_componenet_setup to get it
+ if [ ! -f /var/lib/sfa/server.key ]; then
+ /usr/bin/sfa_component_setup.py -k
+ fi
+}
start() {
echo -n $"Starting SFA: "
if [ "$SFA_CM_ENABLED" ]; then
echo "Component Mgr"
- /usr/bin/sfa-server.py -c -d $OPTIONS
+ # make sure server key (nodes private key) exists first
+ init_key
+ /usr/bin/sfa-start.py -c -d $OPTIONS
fi
RETVAL=$?
stop() {
echo -n $"Shutting down SFA: "
- killproc sfa-server.py
+ killproc sfa-start.py
RETVAL=$?
echo