[SVN] r543 - in /trunk/cyrus-imapd-2.2.13/debian: changelog
cyrus-common-2.2.cyrus2.2.default cyrus-common-2.2.cyrus2.2.init
debian at incase.de
debian at incase.de
Tue Aug 8 16:36:01 UTC 2006
Author: sven
Date: Tue Aug 8 18:36:00 2006
New Revision: 543
URL: https://mail.incase.de/viewcvs?rev=543&root=cyrus22&view=rev
Log:
Use more of the options from defaults file, add aa few more including a generic one
Modified:
trunk/cyrus-imapd-2.2.13/debian/changelog
trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.default
trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init
Modified: trunk/cyrus-imapd-2.2.13/debian/changelog
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/changelog?rev=543&root=cyrus22&r1=542&r2=543&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/changelog (original)
+++ trunk/cyrus-imapd-2.2.13/debian/changelog Tue Aug 8 18:36:00 2006
@@ -29,8 +29,11 @@
combination with sasl_mech_list.
* Sync with 2.2 CVS tree from upstream, including a few documentation fixes
and a fix returning empty strings for empty message parts instead of NULL
-
- -- Sven Mueller <sven at debian.org> Sun, 6 Aug 2006 20:19:49 +0200
+ * Add some more options to /etc/default/cyrus2.2 and use them in the init
+ script, including a generic OPTIONS variable to allow setting of any
+ commandline option for cyrmaster. (Closes: #382061)
+
+ -- Sven Mueller <sven at debian.org> Tue, 8 Aug 2006 18:29:47 +0200
cyrus-imapd-2.2 (2.2.13-4) unstable; urgency=low
Modified: trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.default
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.default?rev=543&root=cyrus22&r1=542&r2=543&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.default (original)
+++ trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.default Tue Aug 8 18:36:00 2006
@@ -22,9 +22,19 @@
#CYRUSOPTFILESYS=1
# The default Cyrus IMAP config file that the scripts should
-# use. You better know what you're doing if you change this
+# use. You better know what you're doing if you change this
#CONF=/etc/imapd.conf
+
+# The default cyrus master config file that the scripts shoud
+# use. You better know what you're doing if you change this.
+#MASTERCONF=/etc/cyrus.conf
# Check spool condition with chk_cyrus on daily cronjob
# Set to 1 to enable, default is disabled
#CHKCYRUS=0
+
+# Set the path to the PID file
+#PIDFILE=/var/run/cyrmaster.pid
+
+# Set other Options here.
+OPTIONS=""
Modified: trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init?rev=543&root=cyrus22&r1=542&r2=543&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init (original)
+++ trunk/cyrus-imapd-2.2.13/debian/cyrus-common-2.2.cyrus2.2.init Tue Aug 8 18:36:00 2006
@@ -29,22 +29,28 @@
# Overridable defaults
unset CYRUS_VERBOSE
unset LISTENQUEUE
+unset CONF
+unset MASTERCONF
[ -r /etc/default/cyrus2.2 ] && . /etc/default/cyrus2.2
[ "x${CYRUS_VERBOSE}" != "x" ] && export CYRUS_VERBOSE
-OPTIONS="-d"
+# Make sure the master process is daemonized
+OPTIONS="${OPTIONS} -d"
+[ "x${CONF}" != "x" ] && OPTIONS="-C ${CONF} ${OPTIONS}"
+[ "x${MASTERCONF}" != "x" ] && OPTIONS="-M ${MASTERCONF} ${OPTIONS}"
[ "x${LISTENQUEUE}" != "x" ] && OPTIONS="-l ${LISTENQUEUE} ${OPTIONS}"
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DAEMON=/usr/sbin/cyrmaster
NAME=cyrmaster
+[ "x${PIDFILE}" = "x" ] && PIDFILE="/var/run/${NAME}.pid"
DESC="Cyrus IMAPd"
test -x ${DAEMON} || exit 0
set -e
-START="--start --quiet --pidfile /var/run/${NAME}.pid --exec ${DAEMON} --name ${NAME} -- ${OPTIONS}"
+START="--start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} --name ${NAME} -- ${OPTIONS}"
verifydb() {
while read -r DBKEY DBVALUE ; do
@@ -86,7 +92,7 @@
else
PRINTIT=true
fi
- if [ ! -f /var/run/${NAME}.pid ]; then
+ if [ ! -f ${PIDFILE} ]; then
# using [c] in the grep avoids catching the grep
# process itself
if ps auxww | grep -qE 'usr/sbin/[c]yrmaster' ; then
@@ -94,20 +100,20 @@
# exists. Though strictly speaking, we should not
# do this, reconstruct the PID file here.
pidof /usr/sbin/cyrmaster > /dev/null 2>&1 \
- && pidof /usr/sbin/cyrmaster > /var/run/${NAME}.pid
- ${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
+ && pidof /usr/sbin/cyrmaster > ${PIDFILE}
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
return 0
fi
fi
- if [ -s /var/run/${NAME}.pid ] && kill -0 `cat /var/run/${NAME}.pid` > /dev/null 2>&1; then
- ${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
+ if [ -s ${PIDFILE} ] && kill -0 `cat ${PIDFILE}` > /dev/null 2>&1; then
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
return 0
else
# the PID file might simply not match the cyrmaster process.
if pidof /usr/sbin/cyrmaster > /dev/null 2>&1 ; then
# go ahead and fix it
- pidof /usr/sbin/cyrmaster > /var/run/${NAME}.pid
- ${PRINTIT} "cyrmaster running with PID `cat /var/run/${NAME}.pid`"
+ pidof /usr/sbin/cyrmaster > ${PIDFILE}
+ ${PRINTIT} "cyrmaster running with PID `cat ${PIDFILE}`"
return 0
else
# no process and/or no PID file, return failure
@@ -170,7 +176,7 @@
if start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--name ${NAME} --quiet --startas $DAEMON >/dev/null 2>&1 ; then
echo "$NAME."
- rm -f /var/run/${NAME}.pid
+ rm -f ${PIDFILE}
exit 0
else
# process running?
@@ -182,7 +188,7 @@
# No, return as if stopped a running process
# successfully.
echo "."
- rm -f /var/run/${NAME}.pid
+ rm -f ${PIDFILE}
exit 0
fi
fi
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list