File: pdns-server.postinst

package info (click to toggle)
pdns 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,824 kB
  • sloc: cpp: 101,240; sh: 5,616; makefile: 2,318; sql: 860; ansic: 675; python: 635; yacc: 245; perl: 161; lex: 131
file content (35 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
set -e

if [ -n "$PDNSDEBUG" ]; then
  echo "now debugging $0 $@"
  set -x
fi

case "$1" in
  configure)
    addgroup --quiet --system pdns
    adduser --quiet --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
    if [ "$2" = "" ]; then
      # Only for new installs. Assume admins know what they are doing.
      # mode 0640 is set by dpkg on initial unpack.
      chown root:pdns /etc/powerdns/pdns.conf || true
    fi
  ;;

  triggered)
    invoke-rc.d pdns restart || :
  ;;

  abort-upgrade|abort-remove|abort-deconfigure)
  ;;

  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
  ;;
esac

#DEBHELPER#

exit 0