BB Unix Network Monitor - Message

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

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




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



Home | Main Index | Thread Index