BB Unix Network Monitor - Message

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

Re: {bb} Scripting BB startup/shutdown in Red Hat



Hi,

think you have to use the following command: su bb -c "/usr/local/bb/bb/runbb.sh stop"
Otherwise you will have a login shell...


Johann


Shane Presley wrote:


Hi Johann,

I tried changing my script to use yours, but I still have the same
problem.  Basically it comes down to this.  If as root....
su bb
/usr/local/bb/bb/runbb.sh stop

That works fine.

yes, you are in a login shell and run the script

However, if as root....
su - bb -c "/usr/local/bb/bb/runbb.sh stop"

It stops BB, but doesn't clean up $BBHOME/tmp/BBPID, and gives these errors:
Stopping Big Brother...
/usr/local/bb/bb/runbb.sh: line 145: kill: (4931) - Operation not permitted
/usr/local/bb/bb/runbb.sh: line 145: kill: (4931) - Operation not permitted
/usr/local/bb/bb/runbb.sh: line 145: kill: (4932) - No such process
/usr/local/bb/bb/runbb.sh: line 145: kill: (4931) - Operation not permitted
/usr/local/bb/bb/runbb.sh: line 145: kill: (4932) - No such process



don't use the su - bb -c "/usr/local/bb/bb/runbb.sh stop"
instead use su bb -c "/usr/local/bb/bb/runbb.sh stop"

Shane


On Tue, 21 Dec 2004 16:58:46 +0100, Johann Eggers
<johann.eggers@teleatlas.com> wrote:


Hi,

I use the following simple start/stop script:

#!/bin/sh
#
#       Start script for Big Brother and Tools on LINUX
#
#       Johann Eggers (jeg), 22.08.2002

BBHOME=/opt/bb

case "$1" in

'start')
       su bb -c "/opt/bb/runbb.sh $1"
       ;;

'stop')
       su bb -c "/opt/bb/runbb.sh $1"
       ;;

'restart')
       su bb -c "/opt/bb/runbb.sh $1"
       ;;
*)
       echo "Usage: $0 [start|stop|restart]"
       ;;
esac

Johann


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
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.



-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-= 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