Hello all, For reasons which I cannot understand, our unix admins feel the need to reboot their machines constantly. I don't think there is an uptime exceeding 2 weeks!! However when that happens, the BB client stops reporting and I eventually get the purple alerts from Hobbit. Can someone tell me how to get the clients to auto-restart? Also, I am not a coder so please don't tell me to "write a script to make them start at reboot" because that is obvious....i just don't know how. Thank you for all input on this.
kevin
On Sat, Apr 23, 2005 at 11:41:15AM -0400, kevin hanrahan wrote:
For reasons which I cannot understand, our unix admins feel the need to reboot their machines constantly. I don't think there is an uptime exceeding 2 weeks!! However when that happens, the BB client stops reporting and I eventually get the purple alerts from Hobbit. Can someone tell me how to get the clients to auto-restart? Also, I am not a coder so please don't tell me to "write a script to make them start at reboot" because that is obvious....i just don't know how. Thank you for all input on this.
Normally a script like this would suffice:
#!/bin/sh
case "$1" in "start") su -c "/usr/local/bb/bbc/runbb.sh start" bb ;;
"stop") su -c "/usr/local/bb/bbc/runbb.sh stop" bb ;; esac
exit 0
Now the trick is to get that script run automatically when the system starts up. How you do that depends on the Unix flavour - often the script is installed in /etc/init.d/bigbrother, and then you need to create links from /etc/rc2.d/S99bigbrother -> /etc/init.d/bigbrother
Regards, Henrik
On Apr 23, 2005, at 11:41 AM, kevin hanrahan wrote:
Hello all, For reasons which I cannot understand, our unix admins feel the need to reboot their machines constantly. I don't think there is an uptime exceeding 2 weeks!! However when that happens, the BB client stops reporting and I eventually get the purple alerts from Hobbit. Can someone tell me how to get the clients to auto-restart? Also, I am not a coder so please don't tell me to "write a script to make them start at reboot" because that is obvious....i just don't know how. Thank you for all input on this.
kevin
Here is the script we use. This one is from a Linux machine and you will need to set BBHOME and BBUSER. Under Linux you can use the chkconfig command to add this. Under other OSes you will need to link it to the run levels you want it to start/stop. Any UNIX administrator should be able to do this or you are paying them too much.
John
% more /etc/init.d/bb
#!/bin/sh
chkconfig: 345 89 19
description: Start up script for Big Brother
Big Brother Startup
PATH=$PATH:/bin:/usr/bin # FOR su BBHOME=/opt/bb/bb BBUSER=bb
case "$1" in start) su - $BBUSER -c "cd $BBHOME;./runbb.sh start" echo "Starting Big Brother." #&SLEEP ;; restart) su - $BBUSER -c "cd $BBHOME;./runbb.sh restart" echo "Restarting Big Brother." #&SLEEP ;; stop) su - $BBUSER -c "cd $BBHOME;./runbb.sh stop" echo "Stopping Big Brother." ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac
exit 0
participants (3)
-
henrik@hswn.dk
-
jturner@ns.wcpss.net
-
kevin@ewormhole.com