|
From: Heiko Z. <smi...@us...> - 2004-12-31 17:40:34
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19924/scripts/scripts Modified Files: Tag: rel-1-2-patches 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.4.4.1 retrieving revision 1.4.4.2 diff -u -d -r1.4.4.1 -r1.4.4.2 --- imapd 31 Dec 2004 16:31:51 -0000 1.4.4.1 +++ imapd 31 Dec 2004 17:40:22 -0000 1.4.4.2 @@ -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 |