BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: {bb} bbshutup.sh - worked in 1.6x but not in 1.9x



Are you getting any error output? Does BBOUT show anything? What do you see if you run it interactively? Try changing the first line to #!/bin/sh -x and running it manually to look for errors.

AD

Jonathan Mergy wrote:


We use a shell script to disable bb for a brief while if we are doing scheduled downtime. Here it is - it doesn't seem to fly now and I don't know why. Any ideas? There was some modification needed but even that didn't fix it. Are there others out there using something similar?



--------------------------------- [bb@foster ~]$ more bbshutup.sh #!/bin/sh # # Check for valid data # if [ $# -ne 3 ]; then echo " Usage: $0 machine.natusmed.com.service time \"reason\"

Machine parameters: FQDN, service is the code used by BB for
        whichever test is relevant (disk, conn; \* matches all-
        note the backslash, without it the shell will try to
        interpret your * and the command will fail)
Time parameters: s m h d shorthand for seconds mintues hours days,
        ergo 15s is 15 seconds, 15m is 15 mintues, etc.
Reason parameters: What will show in the webpage as the reason
        the service is disabled. Note: you must use quotes around
        your reason field, else the shell will interpret the spaces
        as more varabiles, and you will get this error message."
        exit 1
fi

#
# Input validated, assign variables.
#

TARGET=$1
TIME=$2
REASON=$3
BBHOME=/home/bb/bb
export BBHOME
. $BBHOME/etc/bbdef-server.sh

#
# Variables and environment set. Do the deed.
#

$BBHOME/bin/bb $BBDISP "disable $TARGET $TIME $REASON"
[bb@foster ~]$

---------------------------------------------------------------------
----------------
jonathan mergy
mergy@natus.com



-- Andrew Davis North County Computers http://www.nccomp.com

    Email:     andrew@nccomp.com
    Local:     760-525-4689
    Toll Free: 877-735-4689

  <a href="http://www.nccomp.com";>North County Computers</a>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index