dovecot/rc.dovecot

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 148
f6edc24e328f
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

michael@148 1 #!@l_prefix@/bin/openpkg rc
michael@148 2 ##
michael@148 3 ## rc.dovecot -- Run-Commands
michael@148 4 ##
michael@148 5
michael@148 6 %config
michael@148 7 dovecot_enable="$openpkg_rc_def"
michael@148 8 dovecot_log_prolog="true"
michael@148 9 dovecot_log_epilog="true"
michael@148 10 dovecot_log_numfiles="10"
michael@148 11 dovecot_log_minsize="1M"
michael@148 12 dovecot_log_complevel="9"
michael@148 13 dovecot_deliver_log_prolog="true"
michael@148 14 dovecot_deliver_log_epilog="true"
michael@148 15 dovecot_deliver_log_numfiles="10"
michael@148 16 dovecot_deliver_log_minsize="1M"
michael@148 17 dovecot_deliver_log_complevel="9"
michael@148 18
michael@148 19 %common
michael@148 20 dovecot_pidfile="@l_prefix@/var/dovecot/run/master.pid"
michael@148 21 dovecot_signal () {
michael@148 22 [ -f $dovecot_pidfile ] && kill -$1 `cat $dovecot_pidfile`
michael@148 23 }
michael@148 24
michael@148 25 %status -u @l_susr@ -o
michael@148 26 dovecot_usable="unknown"
michael@148 27 dovecot_active="no"
michael@148 28 rcService dovecot enable yes && \
michael@148 29 dovecot_signal 0 && dovecot_active="yes"
michael@148 30 echo "dovecot_enable=\"$dovecot_enable\""
michael@148 31 echo "dovecot_usable=\"$dovecot_usable\""
michael@148 32 echo "dovecot_active=\"$dovecot_active\""
michael@148 33
michael@148 34 %start -u @l_susr@
michael@148 35 rcService dovecot enable yes || exit 0
michael@148 36 rcService dovecot active yes && exit 0
michael@148 37 @l_prefix@/sbin/dovecot
michael@148 38
michael@148 39 %stop -u @l_susr@
michael@148 40 rcService dovecot enable yes || exit 0
michael@148 41 rcService dovecot active no && exit 0
michael@148 42 dovecot_signal TERM
michael@148 43 sleep 2
michael@148 44 rm -f $dovecot_pidfile >/dev/null 2>&1 || true
michael@148 45
michael@148 46 %restart -u @l_susr@
michael@148 47 rcService dovecot enable yes || exit 0
michael@148 48 rcService dovecot active no && exit 0
michael@148 49 rc dovecot stop start
michael@148 50
michael@148 51 %reload -u @l_susr@
michael@148 52 rcService dovecot enable yes || exit 0
michael@148 53 rcService dovecot active no && exit 0
michael@148 54 dovecot_signal HUP
michael@148 55
michael@148 56 %daily -u @l_susr@
michael@148 57 rcService dovecot enable yes || exit 0
michael@148 58 rcTmp -i
michael@148 59 hintfile=`rcTmp -f -n hint`
michael@148 60 shtool rotate -f \
michael@148 61 -n ${dovecot_log_numfiles} -s ${dovecot_log_minsize} -d \
michael@148 62 -z ${dovecot_log_complevel} -m 600 -o @l_susr@ -g @l_sgrp@ \
michael@148 63 -P "${dovecot_log_prolog}" \
michael@148 64 -E "${dovecot_log_epilog}; echo 1 >$hintfile" \
michael@148 65 @l_prefix@/var/dovecot/log/dovecot.log
michael@148 66 if [ -s $hintfile ]; then
michael@148 67 dovecot_signal USR1
michael@148 68 fi
michael@148 69 rcTmp -k
michael@148 70 shtool rotate -f \
michael@148 71 -n ${dovecot_deliver_log_numfiles} -s ${dovecot_deliver_log_minsize} -d \
michael@148 72 -z ${dovecot_deliver_log_complevel} -m 600 -o @l_rusr@ -g @l_rgrp@ \
michael@148 73 -P "${dovecot_deliver_log_prolog}" \
michael@148 74 -E "${dovecot_deliver_log_epilog}" \
michael@148 75 @l_prefix@/var/dovecot/log/deliver.log
michael@148 76

mercurial