summaryrefslogtreecommitdiff
path: root/mail/courier-maildir/files/sharedindexupdate.sh
blob: 401dbe26393c921ec00bc39338b09783bcf237d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!@SH@
#
# $NetBSD: sharedindexupdate.sh,v 1.3 2005/02/28 21:18:16 jlam Exp $
#
# This script updates the index of shared folders on the system and is
# only needed if Courier-IMAP or SqWebMail used to serve mail and shared
# folders are used.  If so, then this script should be run regularly as a
# system process to ensure the shared folder index is kept up-to-date.
#
# The courier-authlib package must be separately installed to provide the
# "authenumerate" program used in this script.

sysconfdir="@PKG_SYSCONFDIR@"
sbindir="@PREFIX@/sbin"

@RM@ -rf $sysconfdir/shared.tmp
@MKDIR@ $sysconfdir/shared.tmp || exit 1

@TEST@ -x $sbindir/authenumerate || exit 1
$sbindir/authenumerate > $sysconfdir/shared.tmp/.tmplist || exit 1
$sbindir/sharedindexsplit $sysconfdir/shared.tmp 1 < $sysconfdir/shared.tmp/.tmplist || exit 1
@RM@ -f $sysconfdir/shared.tmp/.tmplist
$sbindir/sharedindexinstall