]> git.ipfire.org Git - people/ms/dma.git/blame - postinst
Switch to bzip2 compression for the Debian tarball.
[people/ms/dma.git] / postinst
CommitLineData
fa8d8158
PP
1#!/bin/sh
2# postinst script for dma
fa8d8158
PP
3
4set -e
5
d5f2ba39
PP
6. /usr/share/debconf/confmodule
7db_version 2.0
fa8d8158
PP
8
9umask 022
10
11case "$1" in
12 configure)
7fdcd0c2 13 db_get dma/mailname
d5f2ba39
PP
14 echo "$RET" > /etc/mailname
15
16 db_get dma/relayhost
4848a05f
PP
17 if [ -n "$RET" ]; then
18 sed -i -re 's@^[[:space:]]*(#+[[:space:]]*)?SMARTHOST([[:space:]]+.*)?$@SMARTHOST '"$RET@" /etc/dma/dma.conf
19 else
20 sed -i -re 's@^[[:space:]]*(#+[[:space:]]*)?SMARTHOST([[:space:]]+.*)?$@#SMARTHOST@' /etc/dma/dma.conf
21 fi
d5f2ba39
PP
22
23 db_get dma/dbounceprog
4848a05f
PP
24 if [ -n "$RET" ]; then
25 sed -i -re 's/^[[:space:]]*(#+[[:space:]]*)?DBOUNCEPROG([[:space:]]+.*)?$/DBOUNCEPROG '"$RET/" /etc/dma/dma.conf
26 else
27 sed -i -re 's/^[[:space:]]*(#+[[:space:]]*)?DBOUNCEPROG([[:space:]]+.*)?$/#DBOUNCEPROG/' /etc/dma/dma.conf
28 fi
03483467
PP
29
30 if dpkg --compare-versions "$2" lt '0.0.2009.07.17-3'; then
31 chown root:mail /etc/dma/*
32 chmod 640 /etc/dma/*
33 fi
fa8d8158
PP
34 ;;
35
36 abort-upgrade|abort-remove|abort-deconfigure)
37 ;;
38
39 *)
40 echo "postinst called with unknown argument \`$1'" >&2
41 exit 1
42 ;;
43esac
44
45# dh_installdeb will replace this with shell code automatically
46# generated by other debhelper scripts.
47
48#DEBHELPER#
49
50exit 0