File: libapache2-mod-wsgi.postinst

package info (click to toggle)
mod-wsgi 2.5-1~lenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 568 kB
  • ctags: 428
  • sloc: ansic: 7,690; sh: 71; makefile: 59
file content (27 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
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
#!/bin/sh

set -e

apache_force_reload() {
    if apache2ctl configtest 2>/dev/null; then
        invoke-rc.d apache2 force-reload || true
    else
        echo "Your apache2 configuration is broken, please fix it and restart apache2 manually."
    fi
}

if [ -z "$2" ]; then
    if [ -e /etc/apache2/apache2.conf ]; then
        a2enmod wsgi >/dev/null || true
        apache_force_reload
    fi
else
    #we're upgrading
    if [ -e /etc/apache2/mods-enabled/wsgi.load ]; then
        apache_force_reload
    fi
fi

#DEBHELPER#

exit 0