Re: [htdig] start/stop/restart


Subject: Re: [htdig] start/stop/restart
From: Franck Horlaville (fhlist@online.co.ma)
Date: Fri Jul 21 2000 - 08:18:02 PDT


What I did is the following :

start script :

#!/bin/sh
if [ -f /var/run/htdig.pid ]; then exit 0
else

DBDIR=/Local/Library/WebServer/htdig/db
COMMONDIR=/Local/Library/WebServer/htdig/common
BINDIR=/Local/Library/WebServer/htdig/bin

TMPDIR=$DBDIR
export TMPDIR

$BINDIR/htdig -s -l -a &
echo $! > /var/run/htdig.pid

fi

stop script :

#!/bin/sh
if [ -f /var/run/htdig.pid ];
then

kill `cat /var/run/htdig.pid`
rm /var/run/htdig.pid

else
# it ended by itself

DBDIR=/Local/Library/WebServer/htdig/db
COMMONDIR=/Local/Library/WebServer/htdig/common
BINDIR=/Local/Library/WebServer/htdig/bin

TMPDIR=$DBDIR
export TMPDIR

$BINDIR/htmerge -v -s -a

cd $DBDIR && test -f db.docdb.work &&

     for f in *.work
     do
         cp -f $f `basename $f .work`
     done

$BINDIR/htnotify $opts
$BINDIR/htfuzzy $opts soundex metaphone

#
# Create the endings and synonym databases if they don't exist
# or if they're older than the files they're generated from.
# These databases are semi-static, so even if pages change,
# these databases will not need to be rebuilt.
#
if [ "`ls -t $COMMONDIR/english.0 $COMMONDIR/word2root.db 2>/dev/null
| sed 1q`" = \
         "$COMMONDIR/english.0" ]
then
     $BINDIR/htfuzzy $opts endings
fi

if [ "`ls -t $COMMONDIR/synonyms $COMMONDIR/synonyms.db 2>/dev/null |
sed 1q`" = \
         "$COMMONDIR/synonyms" ]
then
     $BINDIR/htfuzzy $opts synonyms
fi

rm /var/run/htdig.pid

fi

=====

Now my question:

what is the syntax to transform: $BINDIR/htdig -s -l -a &

so that I can have
a/ the program running asynchronously (the case now)
b/ its output sent to a log file, a la $BINDIR/htdig -s -l -a -v >
/var/logs/htdig.log

thanks a bunch !

-- 
Franck Horlaville

Athena Online +212 7 68 28 08 http://www.athena.online.co.ma/ mailto:info@athena.online.co.ma

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Thu Jul 20 2000 - 22:18:03 PDT