removing deprecated files
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 23 Mar 2007 02:16:36 +0000 (02:16 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 23 Mar 2007 02:16:36 +0000 (02:16 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@849 9efc2488-bf62-4759-914b-345cdb29e865

bin/jabber_users_create [deleted file]
bin/opensrf_all [deleted file]
bin/opensrf_ctl [deleted file]

diff --git a/bin/jabber_users_create b/bin/jabber_users_create
deleted file mode 100755 (executable)
index 16051a2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl -w
-
-# Pulls the jabber users from the oils/jabber config files
-# and populates the mysql db for the jabber server with the users
-
-use DBI;
-use strict;
-use OpenILS::Utils::Config qw( /pines/conf/oils.conf );
-my $config = OpenILS::Utils::Config->current;
-
-if( @ARGV < 2 ) {
-       print "usage: perl jcreate.pl dbhost dbuser dbpass\n";
-       exit;
-}
-
-
-my $host = $ARGV[0];
-my $user       = $ARGV[1];
-my $pass = $ARGV[2];
-
-my $connection = DBI->connect( "DBI:mysql:jabberd2:$host", $user, $pass )
-       or die "Cannot connect to db: $! \n";
-
-my $jpass = $config->transport->auth->password;
-my $realm = $config->transport->server->primary;
-
-# Delete all users
-my $clean = "delete from authreg;";
-my $sth = $connection->prepare( $clean );
-$sth->execute();
-
-my @users = keys %{$config->transport->users};
-
-# Grab each user from the config and push them into mysql
-for my $user (@users) {
-       if( ! $user or $user eq "__id" or $user eq "__sub") { next; }
-       print "Inserting $user:  ";
-
-       my $sql = "insert into authreg (username, realm, password) values " .
-               "('$user', '$realm', '$jpass');";
-
-       print "[$sql]\n"; 
-
-       $sth = $connection->prepare( $sql );
-       $sth->execute();
-
-}
-
-$sth->finish();
-
diff --git a/bin/opensrf_all b/bin/opensrf_all
deleted file mode 100755 (executable)
index 64c02fd..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/bin/bash
-# --------------------------------------------------------------------
-# Copyright (C) 2005  Georgia Public Library Service 
-# Bill Erickson <highfalutin@gmail.com>
-
-# 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.
-# --------------------------------------------------------------------
-
-
-# --------------------------------------------------------------------------
-# Utility script for starting the jserver (the opensrf jabber server), the
-# opensrf router, and opensrf proper.
-# see vars below for ways to alter the behavior and directory locations
-# --------------------------------------------------------------------------
-
-
-
-# --------------------------------------------------------------------------
-# Change to suit
-# --------------------------------------------------------------------------
-PREFIX=/openils;
-ETCDIR="$PREFIX/conf";  # config files are found here
-LOGDIR="$PREFIX/var/log";      # logs go here
-BINDIR="$PREFIX/bin";  # executables are found here
-BOOTSTRAP="$ETCDIR/bootstrap.conf";    # opensrf config is here
-
-# should these be started? set to "" or nothing to disable them
-JSERVER="1";
-ROUTER="1";
-OPENSRF="1";
-OPENSRFC="1";
-
-#JSERVERSOCK="$PREFIX/var/sock/jserver.sock";  # jabber server socket file 
-#JSERVERLOG="$LOGDIR/jserver.log" # jabber server log 
-JSERVERPORT=5222;                                              # jabber server port 
-#JSERVERLEVEL=3; # can be 1-4, 4 is the highest
-#JSERVERIP="*"; # can be "*" or a specific local IP address
-# --------------------------------------------------------------------------
-# --------------------------------------------------------------------------
-
-JSERVERBIN="chopchop" 
-export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH";
-export PERL5LIB="$PREFIX/lib/perl5:$PERL5LIB";
-export PATH="$PREFIX/bin:$PATH";
-
-
-function fail { echo "$0 exited: $*"; exit 99; }
-
-function usage { echo "$0 [ start | stop | restart | restartforce ]"; }
-
-
-function startJserver {
-
-       ACTIVE=$(netstat -an | grep $JSERVERPORT);
-       
-       if [ -z "$1" ]; then
-               if [ ! -z "$ACTIVE" ]; then
-       
-                       echo "Port $JSERVERPORT is busy. Waiting 60 seconds for the port to clear up..."
-       
-                       for ((i=0; i!= 60; i++)) {
-                               ACTIVE=$(netstat -an | grep $JSERVERPORT);
-                               [ -z "$ACTIVE" ] && break; 
-                               echo -n "+";
-                               sleep 1;
-                       }
-                       echo "";
-                       ACTIVE=$(netstat -an | grep $JSERVERPORT);
-                       [ ! -z "$ACTIVE" ] && fail "Port $JSERVERPORT is busy...exiting";
-               fi;
-       fi;
-       
-       "$BINDIR/$JSERVERBIN" "$ETCDIR/opensrf_core.xml" "chopchop"; 
-}
-
-
-function startRouter {
-       "$BINDIR/opensrf_router" "$ETCDIR/opensrf_core.xml" "router"
-}
-
-function startOpenSRF {
-
-       "$BINDIR/opensrf_ctl" start "$BOOTSTRAP";
-
-       if [ ! -z "$OPENSRFC" ]; then
-               echo "Starting OpenSRF-C...";
-               # localhost will need to be changed...
-               "$BINDIR/opensrf-c" $(hostname -f) "$ETCDIR//opensrf_core.xml" "opensrf"
-               echo "OpenSRF-C started OK";
-       fi
-}
-
-
-function makeMeGo {
-       
-       i=$(whoami) && [ "$i" != "opensrf" ] && echo "Must be run as user 'opensrf'.  Exiting..." && exit;
-       
-       if [ ! -z "$JSERVER" ]; then
-               echo "Starting Chop Chop, Jabber (jserver-c)...";
-               startJserver $1;
-               echo "Chop Chop started OK";
-       fi
-
-       sleep 1;
-
-       if [ ! -z "$ROUTER" ]; then
-               echo "Starting router...";
-               startRouter;
-               echo "Router started OK";
-       fi
-
-       sleep 1;
-
-       if [ ! -z "$OPENSRF" ]; then
-               echo "Starting OpenSRF...";
-               startOpenSRF;
-               echo "OpenSRF started OK";
-       fi
-
-       return 0;
-}
-
-
-function stopMe {
-
-       echo "Stopping OpenSRF...";
-       "$BINDIR/opensrf_ctl" stop;
-       killall -9 opensrf-c;
-       sleep 1;
-       
-       echo "Stopping The Router...";
-       killall -9 "opensrf_router"
-       
-       sleep 1;
-       
-       echo "Stopping Chop Chop...";
-       killall -9 chopchop;
-       return 0;
-}
-
-
-
-[ "$1" = "stop" ] && stopMe && exit;
-[ "$1" = "restart" ] && stopMe && makeMeGo && exit;
-[ "$1" = "restartforce" ] && stopMe && makeMeGo 1 && exit;
-[ "$1" = "start" ] && makeMeGo && exit;
-
-
-usage;
diff --git a/bin/opensrf_ctl b/bin/opensrf_ctl
deleted file mode 100755 (executable)
index 9850277..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-
-# 
-#  Simple rc script for controlling the system
-#  Only works on linux because of 'ps' syntax
-#
-
-function usage {
-       echo "usage: $0 [start|stop|restart|status] <boostrap_config (on start and restart)>";
-       exit;
-}
-
-function startSystem {
-
-       i=$(whoami) && [ "$i" != "opensrf" ] && echo "Must be run as user 'opensrf'.  Exiting..." && exit;
-
-       case $1 in 
-       
-               "start")
-                       [ -z "$2" ] && usage;
-                       perl -MOpenSRF::System="$2" -e 'OpenSRF::System->bootstrap()' & 
-                       sleep 5;
-                       $0 status;
-                       echo;
-                       ;;
-       
-               "startprofile")
-                       [ -z "$2" ] && usage;
-                       OPENSRF_PROFILE=1 perl -MOpenSRF::System="$2" -e 'OpenSRF::System->bootstrap()' & 
-                       sleep 5;
-                       $0 status;
-                       echo;
-                       ;;
-       
-               "stop")
-                       PID=$(ps ax | grep -i "opensrf system" | grep -v grep | awk '{print $1}');
-
-                       if [ -z "$PID" ]; then
-                               echo "OpenSRF System is not running";
-                               exit;
-
-                       else
-                               echo "Killing System...$PID";
-                               kill -s INT $PID;
-                       fi
-
-                       echo "Done";
-                       ;;
-       
-               "status")
-                       PID=$(ps ax | grep -i "opensrf system" | grep -v grep | awk '{print $1}');
-                       if [ -z "$PID" ]; then
-                               echo "OpenSRF System is not running";
-                               exit 0;
-                       fi
-                       echo "OpenSRF System is running";
-                       exit 1;
-                       ;;
-       
-               "restart")
-                       [ -z "$2" ] && usage;
-                       $0 stop;
-                       $0 start $2;
-                       ;;
-               *)
-                       usage;
-                       ;;
-       esac
-}
-
-startSystem $*;
-       
-