dies if user is not "opensrf"
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 23 May 2006 02:43:15 +0000 (02:43 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 23 May 2006 02:43:15 +0000 (02:43 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@726 9efc2488-bf62-4759-914b-345cdb29e865

bin/osrf_ctl.sh

index 585b4ae..ab160b6 100755 (executable)
@@ -5,6 +5,12 @@ OPT_PERL_CONFIG=""
 OPT_C_CONFIG=""
 OPT_PID_DIR=""
 
+# ---------------------------------------------------------------------------
+# Make sure we're running as the correct user
+# ---------------------------------------------------------------------------
+[ $(whoami) != 'openesrf' ] && echo 'Must run as user "opensrf"' && exit;
+
+
 # NOTE: Eventually, there will be one OpenSRF config file format
 # When this happens, we will only need a single OPT_CONFIG variable
 
@@ -55,7 +61,6 @@ PID_OSRF_PERL="$OPT_PID_DIR/osrf_perl.pid";
 PID_OSRF_C="$OPT_PID_DIR/osrf_c.pid";
 
 
-
 # ---------------------------------------------------------------------------
 # Utility code for checking the PID files
 # ---------------------------------------------------------------------------