]> git.ipfire.org Git - thirdparty/pdns.git/blob - builder-support/debian/dnsdist/debian-jessie/dnsdist.postinst
Merge pull request #8777 from omoerbeek/rec-wip-qname-vs-ds
[thirdparty/pdns.git] / builder-support / debian / dnsdist / debian-jessie / dnsdist.postinst
1 #! /bin/sh
2
3 set -e
4
5 # summary of how this script can be called:
6 # * <postinst> `configure' <most-recently-configured-version>
7 # * <old-postinst> `abort-upgrade' <new version>
8 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
9 # <new-version>
10 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
11 # <failed-install-package> <version> `removing'
12 # <conflicting-package> <version>
13 # for details, see http://www.debian.org/doc/debian-policy/ or
14 # the debian-policy package
15
16 case "$1" in
17 configure)
18
19 adduser --force-badname --system --home /nonexistent --group \
20 --no-create-home --quiet _dnsdist || true
21
22 if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then
23 chown root:_dnsdist /etc/dnsdist/dnsdist.conf
24 # Make sure that dnsdist can read it; the default used to be 0600
25 chmod g+r /etc/dnsdist/dnsdist.conf
26 fi
27 ;;
28
29 abort-upgrade|abort-remove|abort-deconfigure)
30 ;;
31
32 *)
33 echo "postinst called with unknown argument \`$1'" >&2
34 exit 1
35 ;;
36 esac
37
38 # dh_installdeb will replace this with shell code automatically
39 # generated by other debhelper scripts.
40
41 #DEBHELPER#
42
43 exit 0