From 2aca91d6f77dbd9974a8589a7e781d14a6582232 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 23 May 2006 02:43:15 +0000 Subject: [PATCH] dies if user is not "opensrf" git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@726 9efc2488-bf62-4759-914b-345cdb29e865 --- bin/osrf_ctl.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/osrf_ctl.sh b/bin/osrf_ctl.sh index 585b4ae..ab160b6 100755 --- a/bin/osrf_ctl.sh +++ b/bin/osrf_ctl.sh @@ -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 # --------------------------------------------------------------------------- -- 2.43.2