How can I go about checking the environmental variables? It is running from root's crontab.
On 9/7/04 3:55 PM, "Jonathan B. Bayer" <[EMAIL PROTECTED]> wrote: > Hello Clint, > > Sounds like an environment issue to me. Check your environmental variables. > See what's different, and if necessary, set them in the shell script. > > It could also be permissions. Are you installing it into root's crontab? > > > JBB > > Tuesday, September 7, 2004, 4:25:40 PM, you wrote: > > CD> Still having some problems with the crontab... > > > CD> When I execute the following command as root, everything works great. > CD> $ sh /Library/Tenon/Htdig/bin/rundig-realtree.sh > > > > > CD> When the system crontab executes the same command, I get errors: > CD> htdig: Unable to open/create document database > CD> '/Library/Tenon/Htdig/db/www.realtree.com/db.docdb.work' > > CD> htmerge: Unable to create temporary word file > CD> '/Library/Tenon/Htdig/db/www.realtree.com/db.wordlist.work.new' > > > > > CD> Here's the crontab: > CD> 0 2 * * * root sh > CD> /Library/Tenon/Htdig/bin/rundig-realtree.sh > > > > > CD> Here are the contents of the shell script: > CD> #! /bin/sh > > CD> if [ "$1" = "-v" ]; then > CD> verbose="-v" > CD> fi > > CD> # This is the directory where htdig lives > CD> BASEDIR=/Library/Tenon/Htdig > > CD> # This is the db dir > CD> DBDIR=$BASEDIR/db/www.realtree.com > > CD> # This is the directory htdig will use for temporary sort files > CD> TMPDIR=/tmp > CD> export TMPDIR > > CD> # This is the name of a temporary report file > CD> REPORT=$TMPDIR/htdig.realtree > > CD> # This is who gets the report > CD> REPORT_DEST="[EMAIL PROTECTED]" > CD> export REPORT_DEST > > CD> # This is the subject line of the report > CD> SUBJECT="ht://Dig Report for Realtree" > > CD> # This is the name of the conf file to use > CD> CONF=www.realtree.com.conf > > CD> # This is the PATH used by this script. Change it if you have problems > CD> # with not finding wc or grep. > CD> PATH=/usr/local/bin:/usr/bin:/bin > > CD> ##### Dig phase > > CD> STARTTIME=`date` > CD> echo Start time: $STARTTIME > CD> echo rundig: Start time: $STARTTIME > $REPORT > CD> $BASEDIR/bin/htdig $verbose -s -a -c $BASEDIR/conf/$CONF >> $REPORT > CD> TIME=`date` > CD> echo Done Digging: $TIME > CD> echo rundig: Done Digging: $TIME >> $REPORT > > CD> ##### Merge Phase > > CD> $BASEDIR/bin/htmerge $verbose -s -a -c $BASEDIR/conf/$CONF >> $REPORT > CD> TIME=`date` > CD> echo Done Merging: $TIME > CD> echo rundig: Done Merging: $TIME >> $REPORT > > CD> ##### Cleanup Phase > CD> # To enable htnotify, uncomment the following line > CD> # $BASEDIR/bin/htnotify $verbose >>$REPORT > > CD> # To enable the soundex or endings search, uncomment the following line > CD> $BASEDIR/bin/htfuzzy $verbose -c $BASEDIR/conf/$CONF endings > > CD> # Move the work files > CD> mv $DBDIR/db.wordlist.work $DBDIR/db.wordlist > CD> mv $DBDIR/db.docdb.work $DBDIR/db.docdb > CD> mv $DBDIR/db.docs.index.work $DBDIR/db.docs.index > CD> mv $DBDIR/db.words.db.work $DBDIR/db.words.db > CD> END=`date` > CD> echo End time: $END > CD> echo rundig: End time: $END >> $REPORT > CD> echo > > CD> # Grab the important statistics from the report file > CD> # All lines begin with htdig: or htmerge: or rundig: > CD> fgrep "htdig:" $REPORT > CD> echo > CD> fgrep "htmerge:" $REPORT > CD> echo > CD> fgrep "rundig:" $REPORT > CD> echo > > CD> WC=`wc -l $REPORT` > CD> echo Total lines in $REPORT: $WC > > CD> # Send out the report ... > CD> mail -s "$SUBJECT - $STARTTIME" $REPORT_DEST < $REPORT > > CD> # ... and clean up > CD> rm $REPORT > > > > CD> ------------------------------------------------------- > CD> This SF.Net email is sponsored by BEA Weblogic Workshop > CD> FREE Java Enterprise J2EE developer tools! > CD> Get your free copy of BEA WebLogic Workshop 8.1 today. > CD> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > CD> _______________________________________________ > CD> ht://Dig general mailing list: <[EMAIL PROTECTED]> > CD> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html > CD> List information (subscribe/unsubscribe, etc.) > CD> https://lists.sourceforge.net/lists/listinfo/htdig-general > > > > > JBB --------------------------------------------------------------------- Clint Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 --------------------------------------------------------------------- ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general