LP#1286248: remove osrf_ctl.sh
authorGalen Charlton <gmc@esilibrary.com>
Fri, 28 Feb 2014 17:33:19 +0000 (09:33 -0800)
committerBill Erickson <berick@esilibrary.com>
Fri, 2 May 2014 18:15:27 +0000 (14:15 -0400)
As osrf_ctl.sh was deprecated in favor of osrf_control, this patch
removes the deprecated script entirely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>

.gitignore
bin/osrf_ctl.sh.in [deleted file]
configure.ac
src/Makefile.am

index a370737..99021f3 100644 (file)
@@ -2,7 +2,6 @@ aclocal.m4
 autom4te.cache/
 bin/opensrf-perl.pl
 bin/osrf_config
-bin/osrf_ctl.sh
 compile
 config.guess
 config.log
diff --git a/bin/osrf_ctl.sh.in b/bin/osrf_ctl.sh.in
deleted file mode 100755 (executable)
index aa6d623..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/sh
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# Strictness to avoid folly
-set -e
-set -u
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-OPT_ACTION=""
-OPT_CONFIG=""
-OPT_PID_DIR=""
-OSRF_HOSTNAME=""
-
-# ---------------------------------------------------------------------------
-# Make sure we're running as the correct user
-# ---------------------------------------------------------------------------
-[ $(whoami) != 'opensrf' ] && echo 'Must run as user "opensrf"' && exit;
-
-
-usage() {
-       cat << EOF
-
-usage: $0 [OPTION]... -c <c_config> -a <action>
-
-Mandatory parameters:
-  -a    action to perform
-
-Optional parameters:";
-  -c    full path to C configuration file (opensrf_core.xml)
-  -d    store PID files in this directory
-  -l    accept 'localhost' as the fully-qualified domain name
-
-Actions include:
-    stop_all
-    start_all
-    restart_all
-
-Examples:
-  $0 -a restart_all
-  $0 -l -c opensrf_core.xml -a restart_all
-
-EOF
-}
-
-# ---------------------------------------------------------------------------
-# Load the command line options and set the global vars
-# ---------------------------------------------------------------------------
-while getopts  "a:d:c:s:k:lh" flag; do
-       case $flag in   
-               "a")            OPT_ACTION="$OPTARG";;
-               "c")            OPT_CONFIG="$OPTARG";;
-               "d")            OPT_PID_DIR="$OPTARG";;
-               "l")            export OSRF_HOSTNAME="localhost";;
-               "h"|*)  usage;;
-       esac;
-done
-
-OSRF_CONFIG="@bindir@/osrf_config"
-[ ! -f "$OSRF_CONFIG" ] && OSRF_CONFIG=`which osrf_config`
-
-[ -z "$OPT_CONFIG" ] && OPT_CONFIG=`$OSRF_CONFIG --sysconfdir`/opensrf_core.xml;
-if [ ! -r "$OPT_CONFIG" ]; then
-       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/opensrf;
-[ -z "$OPT_ACTION" ] && usage;
-
-
-start_all() {
-    opensrf-perl.pl --pid-dir $OPT_PID_DIR \
-        --config $OPT_CONFIG --start-all --settings-startup-pause 3
-}
-
-stop_all() {
-    opensrf-perl.pl --pid-dir $OPT_PID_DIR --config $OPT_CONFIG --stop-all
-}
-
-# ---------------------------------------------------------------------------
-# Do the requested action
-# ---------------------------------------------------------------------------
-echo "$0 is deprecated.  Use osrf_control instead"
-
-case $OPT_ACTION in
-       "stop_all") stop_all;;
-       "start_all") start_all;;
-       "restart_all") stop_all; start_all;;
-       *) usage;;
-esac;
-
-
index 289c356..dd5d3a7 100644 (file)
@@ -375,8 +375,7 @@ if test "x$OSRF_INSTALL_CORE" = "xtrue"; then
                         src/srfsh/Makefile
              tests/Makefile
                         bin/opensrf-perl.pl
-                        bin/osrf_config
-                        bin/osrf_ctl.sh])
+                        bin/osrf_config])
 fi
 
 AC_OUTPUT
index 846eeb9..282f577 100644 (file)
@@ -46,7 +46,7 @@ dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl @top_srcdir@/src/python/open
 else
 dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl
 endif
-bin_SCRIPTS = @top_srcdir@/bin/osrf_config @top_srcdir@/bin/osrf_ctl.sh 
+bin_SCRIPTS = @top_srcdir@/bin/osrf_config
 dist_sysconf_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example 
 endif