[Opensrf-commits] r2075 - trunk/bin (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 11 09:25:04 EST 2010


Author: dbs
Date: 2010-11-11 09:25:02 -0500 (Thu, 11 Nov 2010)
New Revision: 2075

Modified:
   trunk/bin/osrf_ctl.sh.in
Log:
Use the same PID directory as the opensrf-perl.pl and opensrf.py scripts

The default PID directories for the opensrf-perl.pl and opensrf.py scripts
was /openils/var/run/opensrf (assuming a prefix of '/openils'), while the
default PID directory for osrf_ctl.sh was /openils/var/run. This complicated
matters when trying to restart individual Python or Perl services, as without
passing an explicit PID directory argument the restart command from the
language-specific script would check for a PID in a different PID directory,
find none, and end up running a second copy of the service instead of
restarting the existing service.

The change groups all PIDs in the 'run/opensrf' subdirectory to avoid any
PID file conflicts (as unlikely as that might be) if OpenSRF is installed
in the default location - so rather than /var/local/run/*.pid, one will
be able to look at /var/local/run/opensrf/*.pid


Modified: trunk/bin/osrf_ctl.sh.in
===================================================================
--- trunk/bin/osrf_ctl.sh.in	2010-11-10 19:14:19 UTC (rev 2074)
+++ trunk/bin/osrf_ctl.sh.in	2010-11-11 14:25:02 UTC (rev 2075)
@@ -89,7 +89,7 @@
 	echo "Please specify the location of the opensrf_core.xml file using the -c flag";
 	exit 1;
 fi;
-[ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=`$OSRF_CONFIG --localstatedir`/run;
+[ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=`$OSRF_CONFIG --localstatedir`/run/opensrf;
 [ -z "$OPT_ACTION" ] && usage;
 
 PID_ROUTER="$OPT_PID_DIR/router.pid";



More information about the opensrf-commits mailing list