Debian Codegraph @

debian/postinst

raw
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 # quoting from the policy:
17 # Any necessary prompting should almost always be confined to the
18 # post-installation script, and should be protected with a conditional
19 # so that unnecessary prompting doesn't happen if a package's
20 # installation fails and the `postinst' is called with `abort-upgrade',
21 # `abort-remove' or `abort-deconfigure'.
22
23 case "$1" in
24 configure)
25 # Add chasquid user
26 if ! getent passwd chasquid > /dev/null; then
27 adduser --quiet --system --home /var/lib/chasquid --no-create-home \
28 --group --gecos "chasquid mail daemon" chasquid || true
29 fi
30
31 chown chasquid:chasquid /var/lib/chasquid || true
32 ;;
33
34 abort-upgrade|abort-remove|abort-deconfigure)
35 :
36 ;;
37
38 *)
39 echo "postinst called with unknown argument \`$1'" >&2
40 exit 1
41 ;;
42 esac
43
44 # dh_installdeb will replace this with shell code automatically
45 # generated by other debhelper scripts.
46
47 #DEBHELPER#
48
49 exit 0