start_perl
stop_perl
restart_perl
+ start_python
+ stop_python
+ restart_python
start_c
stop_c
restart_c
return 0;
}
+start_python() {
+ [ ! $($OSRF_CONFIG | grep OSRF_PYTHON) ] && return;
+ echo "Starting OpenSRF Python";
+ OPT_LOCAL=""
+ [ "$OSRF_HOSTNAME" = "localhost" ] && OPT_LOCAL="-l"
+ opensrf.py -d -p $OPT_PID_DIR -f $OPT_CONFIG -a start_all $OPT_LOCAL
+ return 0;
+}
+
+stop_python() {
+ [ ! $($OSRF_CONFIG | grep OSRF_PYTHON) ] && return;
+ echo "Stopping OpenSRF Python";
+ OPT_LOCAL=""
+ [ "$OSRF_HOSTNAME" = "localhost" ] && OPT_LOCAL="-l"
+ opensrf.py -p $OPT_PID_DIR -f $OPT_CONFIG -a stop_all $OPT_LOCAL
+ sleep 1;
+ return 0;
+}
+
start_perl() {
echo "Starting OpenSRF Perl";
opensrf-perl.pl --verbose --pid-dir $OPT_PID_DIR \
"start_perl") start_perl;;
"stop_perl") stop_perl;;
"restart_perl") stop_perl; start_perl;;
+ "start_python") start_python;;
+ "stop_python") stop_python;;
+ "restart_python") stop_python; start_python;;
"start_c") start_c;;
"stop_c") stop_c;;
"restart_c") stop_c; start_c;;
- "start_osrf") start_perl; start_c;;
- "stop_osrf") stop_perl; stop_c;;
- "restart_osrf") stop_perl; stop_c; start_perl; start_c;;
- "stop_all") stop_c; stop_perl; stop_router;;
- "start_all") start_router; start_perl; start_c;;
- "restart_all") stop_c; stop_perl; stop_router; start_router; start_perl; start_c;;
+ "start_osrf") start_perl; start_c; start_python;;
+ "stop_osrf") stop_python; stop_c; start_perl;;
+ "restart_osrf") stop_python; stop_c; stop_perl; start_perl; start_c; start_python;;
+ "stop_all") stop_python; stop_c; stop_perl; stop_router;;
+ "start_all") start_router; start_perl; start_c; start_python;;
+ "restart_all") stop_python; stop_c; stop_perl; stop_router; start_router; start_perl; start_c; start_python;;
*) usage;;
esac;
if BUILDCORE
MAYBE_CORE = libopensrf c-apps router srfsh gateway perl
+if BUILDPYTHON
+dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl @top_srcdir@/src/python/opensrf.py
+else
dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl
+endif
bin_SCRIPTS = @top_srcdir@/bin/osrf_config @top_srcdir@/bin/osrf_ctl.sh
dist_sysconf_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example
endif