File: libapache-mod-mono.prerm

package info (click to toggle)
mod-mono 1.2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,640 kB
  • ctags: 230
  • sloc: sh: 8,606; ansic: 1,750; makefile: 120
file content (53 lines) | stat: -rw-r--r-- 1,001 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
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
#!/bin/sh -e

apachecfg="/etc/apache"
restart=""

turnoff_module() {
for i in apache apache-ssl; do
        if [ -e $apachecfg ]; then
            if [ -d /etc/$i ]; then
                modules-config $i disable libmod_mono quiet
            fi
        fi
done

}

remove_monoserver_conf() {
   webservers="apache-ssl apache"

    #wwwconfig way! I love it!
   for server in $webservers; do
       includefile=/etc/mono-server/mono-server-hosts.conf
       conffile=/etc/apache/httpd.conf
       . /usr/share/wwwconfig-common/apache-uninclude.sh
       if [ "$status" = "purge" ]; then
	   restart="$restart $server"
       fi
   done
}

restart_apache() {
    servers="apache-ssl apache"
    . /usr/share/wwwconfig-common/restart.sh
}

case "$1" in
  remove)
        turnoff_module
	remove_monoserver_conf
	restart_apache
        ;;
    upgrade | deconfigure | failed-upgrade)
        :
        ;;
    *) 
        echo "postinst failed \`$1'" >&2
        exit 0
        ;;
esac

#DEBHELPER#

exit 0