Startup Script wont run correctly at startup

From: Michael W <mwarchut_at_comcast.net>
Date: Thu, 09 Mar 2006 16:20:45 -0800

Good afternoon fellow admins

I have a startup script that I am trying to get to execute on boot of our
ES40.  the script runs great from the CLI and does what it is supposed to
do.  However when the server boots up the script does not run properly. The
script does run but dbiproxy does not start like it should. 

Does anyone out there have DBIPROXY running on their system and starting
up? 

Below is my script.  Any suggestions would be greatly appreciated.

Michael


#!/sbin/sh
#
# *****************************************************************
# *                                                               *
# *   Copyright 2006 INC                                  *
# *                                                               *
# *****************************************************************
#
#

RCMGR=/usr/sbin/rcmgr
PATH=/sbin:/usr/sbin:/usr/bin
export PATH

psmName="startdbi"

case "$1" in
'start')

        echo "Starting the dbi proxy"
        su - root /usr/local/bin/dbiproxy --pidfile /var/run/dbiproxy.pid
--child=5 --mode=single --logfile=/db/logs/dbi.log --local
port=12000 >/dev/null 2>&1 &

        ;;

'stop')

        echo "Stopping dbi proxy"
        PIDS=`ps ax |grep [d]biproxy | awk '{print  $1}'`

        for pid in $PIDS
        do
                echo "Killing $pid"
                kill -9 $pid
        done
;;

*)
        echo "usage: $0 {start|stop}"
        ;;
esac
Received on Fri Mar 10 2006 - 00:22:24 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT