This file is indexed.

postinst is in pyca 20031119-0.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /bin/bash

set -e

pyca_setup_user() {
        if ! id pyca > /dev/null 2>&1 ; then
                adduser --system --no-create-home pyca 2>&1 > /dev/null || exit 78
        fi
}

pyca_log_perms() {

    if test -e /var/log/pyca; then

	chmod 655 /var/log/pyca || exit 78
	chgrp adm /var/log/pyca || exit 78
	

    fi

    if id www-data > /dev/null 2>&1; then

	chgrp www-data /var/log/pyca/httpd_error_log || exit 78
	chmod 620 /var/log/pyca/httpd_error_log || exit 78

    fi

    if id daemon > /dev/null 2>&1; then

	chgrp daemon /var/log/pyca/ca-certreq-mail.out || exit 78
	chmod 620 /var/log/pyca/ca-certreq-mail.out || exit 78

    fi

}

pyca_make_alias() {

    if test -e /etc/aliases; then 

	if ! grep -q ca-certreq-mail /etc/aliases;then

	    cat >> /etc/aliases <<EOF || exit 78

# The following line added for pyca
ca-certreq-mail: |/usr/sbin/ca-certreq-mail.py
EOF
	    if test -e /usr/bin/newaliases; then 
		newaliases 2>&1 > /dev/null || exit 78
	    fi

	fi

    fi

}


case "$1" in
    configure)

pyca_setup_user
pyca_log_perms
pyca_make_alias

    ;;

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

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



exit 0