~ubuntu-branches/ubuntu/saucy/suphp/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/libapache2-mod-suphp.postinst

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-07-12 09:15:32 UTC
  • Revision ID: package-import@ubuntu.com-20130712091532-cn5id7n4gx0yii1a
Tags: 0.7.1-3.1
* Non-maintainer upload.
* Revert to 0.7.1-2 for Apache 2.4 transition (closes: #709462).
* Remove hardcoded Build-Depends/Depends: apache2-api-20120211.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
# postinst script for libapache-mod-suphp
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
 
 
20
 
reload_apache()
21
 
{
22
 
    if apache2ctl configtest 2>/dev/null; then
23
 
        invoke-rc.d apache2 force-reload || true
24
 
    else
25
 
        echo "Your apache2 configuration is broken, so we're not restarting it for you."
26
 
    fi
27
 
}
28
 
 
29
 
 
30
 
case "$1" in
31
 
    configure)
32
 
        # Reload the module on upgrade if enabled
33
 
        if [ -n "$2" ]; then
34
 
            if [ -e /etc/apache2/mods-enabled/suphp.load ]; then
35
 
                reload_apache
36
 
            fi
37
 
        else 
38
 
            # Enable the module
39
 
            if [ -e /etc/apache2/apache2.conf ]; then
40
 
                a2enmod suphp >/dev/null || true
41
 
                reload_apache
42
 
            fi
43
 
        fi
44
 
    ;;
45
 
 
46
 
    abort-upgrade|abort-remove|abort-deconfigure)
47
 
 
48
 
    ;;
49
 
 
50
 
    *)
51
 
        echo "postinst called with unknown argument \`$1'" >&2
52
 
        exit 1
53
 
    ;;
54
 
esac
55
 
 
56
 
# dh_installdeb will replace this with shell code automatically
57
 
# generated by other debhelper scripts.
58
 
 
59
 
#DEBHELPER#
60
 
 
61
 
exit 0
62
 
 
63