Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6673/scripts/scripts
Modified Files:
Tag: rel-1-2-patches
imapd
Log Message:
- imapd init script now allows different data directory locations
Index: imapd
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/imapd,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -d -r1.4 -r1.4.4.1
--- imapd 11 Aug 2003 00:10:31 -0000 1.4
+++ imapd 31 Dec 2004 16:31:51 -0000 1.4.4.1
@@ -46,12 +46,14 @@
case "$1" in
start)
+ CONFIG_DIR=$(grep configdirectory /etc/imapd.conf | cut -f2 -d:)
+ PARTITION_DIR=$(grep partition-default /etc/imapd.conf | cut -f2 -d:)
if [ ! -d /var/imap/db ] ;then
/usr/lib/cyrus/bin/mkimap || exit 1
- chown -R cyrus.mail /var/imap /var/imap/* || exit 1
- chmod -R 750 /var/imap /var/imap/* || exit 1
- chown -R cyrus.mail /var/spool/imap /var/spool/imap/* || exit 1
- chmod -R 750 /var/spool/imap /var/spool/imap/* || exit 1
+ chown -R cyrus.mail $CONFIG_DIR $CONFIG_DIR/* || exit 1
+ chmod -R 750 $CONFIG_DIR $CONFIG_DIR/* || exit 1
+ chown -R cyrus.mail $PARTITION_DIR $PARTITION_DIR/* || exit 1
+ chmod -R 750 $PARTITION_DIR $PARTITION_DIR/* || exit 1
fi
echo -n "Starting $NAME: "
|