dovecot/rc.dovecot

Fri, 15 Oct 2010 18:46:25 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 15 Oct 2010 18:46:25 +0200
changeset 261
4f973c756446
parent 148
f6edc24e328f
permissions
-rw-r--r--

Update copyright, file server URL, modify doc and link logic.
Now documentation is installed by default to the correct path,
and QtCreator links against Qt shared libraries instead of Qt
static libraries. This unfortunate change supports Nokia's
unfortunate decision to poorly support static linking in Qt.

     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