|
From: Heiko Z. <smi...@us...> - 2004-12-31 17:41:23
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20166/scripts/scripts Modified Files: imapd Log Message: - imapd init script doesn't kill the postfix master process anymore Index: imapd =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/imapd,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- imapd 31 Dec 2004 16:32:54 -0000 1.5 +++ imapd 31 Dec 2004 17:41:12 -0000 1.6 @@ -49,11 +49,16 @@ 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 $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 + /usr/lib/cyrus/bin/mkimap || 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 + else + chown cyrus.mail $CONFIG_DIR || exit 1 + chmod 750 $CONFIG_DIR || exit 1 + chown cyrus.mail $PARTITION_DIR || exit 1 + chmod 750 $PARTITION_DIR || exit 1 fi echo -n "Starting $NAME: " @@ -62,7 +67,15 @@ ;; stop) echo -n "Shutting down $NAME: " - killproc $DAEMON + PID=$(cat /var/run/cyrus-master.pid) + if [ -n "$PID" ]; then + kill $PID + evaluate_retval + rm /var/run/cyrus-master.pid + else + print_status failure + echo "Service not running or PID not found" + fi ;; restart) $0 stop |