From: <buc...@us...> - 2009-01-09 15:42:48
|
Revision: 114 http://devmon.svn.sourceforge.net/devmon/?rev=114&view=rev Author: buchanmilne Date: 2009-01-09 15:42:43 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Use Hobbit/BB environment variables if present Adjust init script to run devmon under Hobbit or BB environment Modified Paths: -------------- trunk/extras/devmon.initd.redhat trunk/modules/dm_config.pm Modified: trunk/extras/devmon.initd.redhat =================================================================== --- trunk/extras/devmon.initd.redhat 2009-01-09 14:34:00 UTC (rev 113) +++ trunk/extras/devmon.initd.redhat 2009-01-09 15:42:43 UTC (rev 114) @@ -18,6 +18,13 @@ [ -e /etc/sysconfig/devmon ] && . /etc/sysconfig/devmon prog="/usr/local/devmon/devmon" +if [ -e ~hobbit/client/bin/bbcmd ] +then prog="~hobbit/client/bin/bbcmd $prog" +elif [ -e ~xymon/client/bin/bbcmd ] +then prog="~xymon/client/bin/bbcmd $prog" +elif [ -e ~bb/etc/bbdef.sh ] +then . ~bb/etc/bbdef.sh +fi start() { echo -n $"Starting Devmon: " @@ -143,7 +150,7 @@ RETVAL=$? ;; reload|readbbhosts) - $prog --readbbhosts + sh -c "$prog $ARGS --readbbhosts" RETVAL=$? ;; rotate) Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2009-01-09 14:34:00 UTC (rev 113) +++ trunk/modules/dm_config.pm 2009-01-09 15:42:43 UTC (rev 114) @@ -54,8 +54,9 @@ 'active' => '', 'pidfile' => '', 'logfile' => '', - 'bbosts' => '', + 'bbhosts' => '', 'bbtag' => '', + 'bblocation' => '', 'nodename' => '', 'log' => '', @@ -121,7 +122,7 @@ 'regex' => 'yes|no', 'set' => 0, 'case' => 0 }, - 'bbhosts' => { 'default' => '/home/hobbit/server/etc/bb-hosts', + 'bbhosts' => { 'default' => ($ENV{'BBHOSTS'} ne '') ? $ENV{'BBHOSTS'} : '/home/hobbit/server/etc/bb-hosts', 'regex' => '.+', 'set' => 0, 'case' => 1 }, @@ -169,11 +170,11 @@ 'regex' => 'bb|hobbit', 'set' => 0, 'case' => 0 }, - 'dispserv' => { 'default' => 'localhost', + 'dispserv' => { 'default' => ($ENV{BBDISP} ne '') ? $ENV{'BBDISP'} : 'localhost', 'regex' => '\S+', 'set' => 0, 'case' => 0 }, - 'dispport' => { 'default' => 1984, + 'dispport' => { 'default' => ($ENV{'BBPORT'} ne '') ? $ENV{'BBPORT'} : 1984, 'regex' => '\d+', 'set' => 0, 'case' => 0 }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |