You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by co...@locus.apache.org on 2000/03/02 02:24:40 UTC
cvs commit: jakarta-watchdog/src/conf server-test.xml
costin 00/03/01 17:24:40
Modified: . build.xml
src/bin watchdog.sh
Removed: src/conf server-test.xml
Log:
Small fixes to watchdog build and sh.
Now watchdog is a standalone program, no dependency on tomcat.
Revision Changes Path
1.29 +1 -1 jakarta-watchdog/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-watchdog/build.xml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- build.xml 2000/03/01 02:33:09 1.28
+++ build.xml 2000/03/02 01:24:38 1.29
@@ -9,7 +9,7 @@
<property name="watchdog.build" value="../build/watchdog"/>
<property name="watchdog.dist" value="../dist/watchdog"/>
- <property name="watchdog-classpath" value="../jakarta-tools/moo.jar:" />
+ <property name="watchdog-classpath" value="../jakarta-tools/moo.jar:../jakarta-tools/servlet-2.2.0.jar" />
</target>
1.3 +34 -4 jakarta-watchdog/src/bin/watchdog.sh
Index: watchdog.sh
===================================================================
RCS file: /home/cvs/jakarta-watchdog/src/bin/watchdog.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- watchdog.sh 2000/03/02 00:54:16 1.2
+++ watchdog.sh 2000/03/02 01:24:39 1.3
@@ -19,8 +19,38 @@
HOST=$3
fi
-#WATCHDOG_HOME=`pwd`/..
-WATCHDOG_HOME=..
+if [ -f $HOME/.watchdogrc ] ; then
+ . $HOME/.watchdogrc
+fi
+
+if [ "$WATCHDOG_HOME" = "" ] ; then
+ ## resolve links - $0 may be a link to home
+ PRG=$0
+ progname=`basename $0`
+
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname $PRG`/$link"
+ fi
+ done
+
+ WATCHDOG_HOME_1=`dirname "$PRG"`/..
+ echo "Guessing WATCHDOG_HOME from watchdog.sh to ${WATCHDOG_HOME_1}"
+ if [ -d ${WATCHDOG_HOME_1}/conf ] ; then
+ WATCHDOG_HOME=${WATCHDOG_HOME_1}
+ echo "Setting WATCHDOG_HOME to $WATCHDOG_HOME"
+ fi
+fi
+
+if [ "$WATCHDOG_HOME" = "" ] ; then
+ echo WATCHDOG_HOME not set, you need to set it or install in a standard location
+ exit 1
+fi
+
cp=$CLASSPATH
@@ -43,8 +73,8 @@
echo
if [ "${default}" = jsp -o "${default}" = all ] ; then
- java org.apache.tools.ant.Main -Dport=${PORT} -Dhost=${HOST} -Dwatchdog.home=\
- ${WATCHDOG_HOME} -f ${WATCHDOG_HOME}/conf/jsp.xml jsp-test
+ java org.apache.tools.ant.Main -Dport=${PORT} -Dhost=${HOST} \
+ -Dwatchdog.home=${WATCHDOG_HOME} -f ${WATCHDOG_HOME}/conf/jsp.xml jsp-test
fi
if [ "${default}" = servlet -o "${default}" = all ] ; then