new srpm, built with rpmbuild-md5
[mnogosearch-rpm] / mnogosearch-reindex
CommitLineData
a3f86052
GE
1#!/bin/sh
2# update mnogosearch database
3#
4# to configure mnogosearch, see /etc/mnogosearch
5# and /usr/share/doc/mnogosearch-*
6#
7MAINCONFIG=/etc/mnogosearch/indexer.conf
8
9if [ ! -f $MAINCONFIG ]; then
10 # no config: exit quietly
11 exit 0
12fi
13
14if [ ! -x /usr/bin/indexer ]; then
15 echo "can't execute /usr/bin/indexer" >&2
16 exit 1
17fi
18
19# are we called by the correct user?
20if [ ! -O /var/lib/mnogosearch ]; then
21 echo "indexing can only be done by the mnogosearch user" >&2
22 exit 1
23fi
24
25BASICOPTIONS="-v 0 -d $MAINCONFIG"
26
27# crawl the URLs
28/usr/bin/indexer $BASICOPTIONS --crawl -b -e
29# create a search index
30/usr/bin/indexer $BASICOPTIONS --index
31# create word statistics for suggestions
32/usr/bin/indexer $BASICOPTIONS --wordstat