~ubuntu-branches/debian/sid/mailman/sid

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2011-10-08 17:27:51 UTC
  • Revision ID: james.westby@ubuntu.com-20111008172751-ruznpbshfvmuzabq
Tags: 1:2.1.14-3
* Make man page descruptions match more keywords (closes: #597112).
* Add cull_bad_shunt command to default cron job (closes: #615204)
  and improve cron job handling in the package.
* Import dpkg buildflags, also enabling hardening features.
* Remove gate_news debconf question.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#      Lionel Elie Mamane, Thijs Kinkhorst, Riccardo Setti, Matej Vela, Hector Garcia, László Böszörményi, Bernd S. Brentrup, ...
9
9
#
10
10
# $URL: svn+ssh://svn.debian.org/svn/svn/pkg-mailman/trunk/debian/postinst $
11
 
# $Id: postinst 630 2009-09-25 09:31:03Z thijs $
 
11
# $Id: postinst 693 2011-10-08 15:30:38Z thijs $
12
12
#
13
13
. /usr/share/debconf/confmodule
14
14
 
93
93
    # Install postfix-to-mailman.py as well
94
94
    ucf --debconf-ok --three-way ${mm_dist}/postfix-to-mailman.py ${mm_etc}/postfix-to-mailman.py 2>/dev/null
95
95
 
96
 
    # Configure Mailman crontab
97
 
 
98
 
    # Ensure the file exists before we awk it.
99
 
    if [ ! -f /etc/cron.d/mailman ]; then
100
 
    cat > /etc/cron.d/mailman <<EOF
101
 
# At 8AM every day, mail reminders to admins as to pending requests.
102
 
# They are less likely to ignore these reminders if they're mailed
103
 
# early in the morning, but of course, this is local time... ;)
104
 
0 8 * * * list [ -x /usr/lib/mailman/cron/checkdbs ] && /usr/lib/mailman/cron/checkdbs
105
 
#
106
 
# At 9AM, send notifications to disabled members that are due to be
107
 
# reminded to re-enable their accounts.
108
 
0 9 * * * list [ -x /usr/lib/mailman/cron/disabled ] && /usr/lib/mailman/cron/disabled
109
 
#
110
 
# Noon, mail digests for lists that do periodic as well as threshold delivery.
111
 
0 12 * * * list [ -x /usr/lib/mailman/cron/senddigests ] && /usr/lib/mailman/cron/senddigests
112
 
#
113
 
# 5 AM on the first of each month, mail out password reminders.
114
 
0 5 1 * * list [ -x /usr/lib/mailman/cron/mailpasswds ] && /usr/lib/mailman/cron/mailpasswds
115
 
#
116
 
# Every 5 mins, try to gate news to mail.  You can comment this one out
117
 
# if you don't want to allow gating, or don't have any going on right now,
118
 
# or want to exclusively use a callback strategy instead of polling.
119
 
# */5 * * * * list [ -x /usr/lib/mailman/cron/gate_news ] && /usr/lib/mailman/cron/gate_news
120
 
#
121
 
# At 3:27am every night, regenerate the gzip'd archive file.  Only
122
 
# turn this on if the internal archiver is used and
123
 
# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
124
 
27 3 * * * list [ -x /usr/lib/mailman/cron/nightly_gzip ] && /usr/lib/mailman/cron/nightly_gzip
125
 
EOF
126
 
    fi
127
 
 
128
 
    db_get mailman/gate_news || true
129
 
    if [ "$RET" = "false" ]; then
130
 
        # Comment out any lines containing the words "gate_news"
131
 
        awk '/^[^#]*gate_news/ { print "# " $LINE;next }; //' < /etc/cron.d/mailman > /etc/cron.d/mailman.$$
132
 
    else
133
 
        # Remove commenting of any lines containing gate_news
134
 
        awk '/^[ \t]*#.*gate_news/ { sub(/^[ \t]*#[ \t]*/, ""); print; next }; //' < /etc/cron.d/mailman > /etc/cron.d/mailman.$$
135
 
    fi
136
 
    mv -f /etc/cron.d/mailman.$$ /etc/cron.d/mailman
137
 
 
138
96
    if [ -e /etc/mailman/mm_cfg.py ]; then
139
97
        db_get mailman/default_server_language || true
140
98
        if [ -n "$RET" ]; then