Projet

Général

Profil

Télécharger (1,89 ko) Statistiques
| Branche: | Révision:

root / larpe / tags / release-1.1.1 / debian / postinst @ d03cb81c

1
#! /bin/sh
2
# postinst script for larpe
3
#
4
# see: dh_installdeb(1)
5

    
6
set -e
7

    
8
# summary of how this script can be called:
9
#        * <postinst> `configure' <most-recently-configured-version>
10
#        * <old-postinst> `abort-upgrade' <new version>
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12
#          <new-version>
13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14
#          <failed-install-package> <version> `removing'
15
#          <conflicting-package> <version>
16
# for details, see http://www.debian.org/doc/debian-policy/ or
17
# the debian-policy package
18
#
19
# quoting from the policy:
20
#     Any necessary prompting should almost always be confined to the
21
#     post-installation script, and should be protected with a conditional
22
#     so that unnecessary prompting doesn't happen if a package's
23
#     installation fails and the `postinst' is called with `abort-upgrade',
24
#     `abort-remove' or `abort-deconfigure'.
25

    
26
PACKAGE=larpe
27
VERSION=2.4
28
LIB="/usr/lib/python$VERSION"
29
DIRLIST="/usr/share/pycentral/larpe/site-packages/larpe/"
30

    
31
case "$1" in
32
    configure|abort-upgrade|abort-remove|abort-deconfigure)
33
        for i in $DIRLIST ; do
34
            /usr/bin/python$VERSION -O $LIB/compileall.py -q $i
35
            /usr/bin/python$VERSION $LIB/compileall.py -q $i
36
        done
37

    
38
        # Load Apache 2 modules
39
        for module in "proxy" "rewrite" "headers" "proxy_http"; do
40
            a2enmod ${module} > /dev/null || true
41
        done
42

    
43
        # Restart Apache 2
44
        set +e
45
        if [ -x /usr/sbin/invoke-rc.d ]; then
46
            invoke-rc.d apache2 restart || true
47
        else
48
            /etc/init.d/apache2 restart || true
49
        fi
50
        set -e
51
    ;;
52

    
53
    *)
54
        echo "postinst called with unknown argument \`$1'" >&2
55
        exit 1
56
    ;;
57
esac
58

    
59

    
60

    
61
# dh_installdeb will replace this with shell code automatically
62
# generated by other debhelper scripts.
63

    
64
#DEBHELPER#
65

    
66
exit 0
(10-10/13)