~ubuntu-branches/ubuntu/feisty/pyca/feisty

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Lars Bahner
  • Date: 2003-12-02 19:39:35 UTC
  • Revision ID: james.westby@ubuntu.com-20031202193935-a2izk0amdo1gre1e
Tags: 20031118-1
* New upstream release
* conversion to dpatch
* Significantly reworked debian/rules
* Added patch for encoding type utf-8 to pylib/openssl/cnf.py
  io. to avoid croak from ca2ldif.py. My system
  is utf-8 an so I trust are many others.
* New frontpage
* Typos in man-pages ... which are also UTF-8 :|
* Cascade the manpages to actual files shut lintian up. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
set -e
 
4
 
 
5
pyca_setup_user() {
 
6
        if ! id pyca > /dev/null 2>&1 ; then
 
7
                adduser --system --no-create-home pyca 2>&1 > /dev/null || exit 78
 
8
        fi
 
9
}
 
10
 
 
11
pyca_log_perms() {
 
12
 
 
13
    if test -e /var/log/pyca; then
 
14
 
 
15
        chmod 655 /var/log/pyca || exit 78
 
16
        chgrp adm /var/log/pyca || exit 78
 
17
        
 
18
 
 
19
    fi
 
20
 
 
21
    if id www-data > /dev/null 2>&1; then
 
22
 
 
23
        chgrp www-data /var/log/pyca/httpd_error_log || exit 78
 
24
        chmod 620 /var/log/pyca/httpd_error_log || exit 78
 
25
 
 
26
    fi
 
27
 
 
28
    if id daemon > /dev/null 2>&1; then
 
29
 
 
30
        chgrp daemon /var/log/pyca/ca-certreq-mail.out || exit 78
 
31
        chmod 620 /var/log/pyca/ca-certreq-mail.out || exit 78
 
32
 
 
33
    fi
 
34
 
 
35
}
 
36
 
 
37
pyca_make_alias() {
 
38
 
 
39
    if test -e /etc/aliases; then 
 
40
 
 
41
        if ! grep -q ca-certreq-mail /etc/aliases;then
 
42
 
 
43
            cat >> /etc/aliases <<EOF || exit 78
 
44
ca-certreq-mail: |/usr/sbin/ca-certreq-mail.py
 
45
EOF
 
46
            if test -e /usr/bin/newaliases; then 
 
47
                newaliases 2>&1 > /dev/null || exit 78
 
48
            fi
 
49
 
 
50
        fi
 
51
 
 
52
    fi
 
53
 
 
54
}
 
55
 
 
56
 
 
57
case "$1" in
 
58
    configure)
 
59
 
 
60
pyca_setup_user
 
61
pyca_log_perms
 
62
pyca_make_alias
 
63
 
 
64
    ;;
 
65
 
 
66
    abort-upgrade|abort-remove|abort-deconfigure)
 
67
 
 
68
        ;;
 
69
    
 
70
    *)
 
71
        echo "postinst called with unknown argument \`$1'" >&2
 
72
        exit 64
 
73
    ;;
 
74
esac
 
75
 
 
76
#DEBHELPER#
 
77
 
 
78
exit 0
 
79