function start_router {
do_action "start" $PID_ROUTER "OpenSRF Router";
opensrf_router $OPT_CONFIG routers
+ sleep 2; # give the router procs time to fork and appear in ps
pid=$(ps ax | grep "OpenSRF Router" | grep -v grep | awk '{print $1}')
echo $pid > $PID_ROUTER;
return 0;
do_action "start" $PID_OSRF_C "OpenSRF C (host=$host)";
opensrf-c $host $OPT_CONFIG opensrf;
+ sleep 1; # give the main C proc time to appear in ps
pid=$(ps ax | grep "OpenSRF System-C" | grep -v grep | awk '{print $1}')
echo $pid > "$PID_OSRF_C";
return 0;