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.

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

mercurial