-
Notifications
You must be signed in to change notification settings - Fork 2
/
swish-e.sh
executable file
·32 lines (32 loc) · 1005 Bytes
/
swish-e.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# The location of the swish-e configuration file
#
CONFIG_LOCATION=/home/bweaver/mailman_indices/swish-e.config
#
# The location of where the indexes will be put (should be the same as
# search_index_path in trac.ini).
#
search_index_path=/home/bweaver/mailman_indices
#
# The location of the archive files (should be the same as mail_archive_path
# in trac.ini).
#
mail_archive_path=/var/lib/mailman/archives
#
# DO NOT CHANGE THE NAME OF THE INDEX FILES
#
# Index all the mailman archives, under /var/lib/mailman/public and /var/lib/mailman/private
#
swish-e -c ${CONFIG_LOCATION} -f ${search_index_path}/all-index.swish-e
#
# Index each individual mailman archive in public and private
#
for p in public private; do
for f in $( /bin/ls ${mail_archive_path}/${p} ); do
extension=${f##*.}
if [ "${extension}" != "mbox" ]
then swish-e -c ${CONFIG_LOCATION} -i ${mail_archive_path}/${p}/${f} -f ${search_index_path}/${f}-index.swish-e
fi
done
done