File: postrm

package info (click to toggle)
libapache-mod-random 1.4-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 152 kB
  • ctags: 59
  • sloc: ansic: 318; sh: 170; makefile: 90
file content (51 lines) | stat: -rw-r--r-- 1,157 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
#!/bin/sh -e

# Standard postrm script for apache modules
# Written April 2006 by Pawel Wiecek <coven@debian.org>

MODULE=mod_random

# Source debconf library.
. /usr/share/debconf/confmodule

case "$1" in
  remove)
    db_get shared/apache-modules/counters/remove
    COUNT="$RET"
    let COUNT-- || true
    db_set shared/apache-modules/counters/remove "$COUNT"
    if [ "$COUNT" -eq 0 ]
    then
      # this is a last removed module, time to act
      db_get shared/apache-modules/counters/remove_list
      LIST="$RET"
      for ap in '' -ssl -perl
      do
	[ -x /usr/sbin/apache$ap ] && \
	  apache-modconf apache$ap disable "`echo $LIST | sed -e 's/^,//'`"
      done
      db_set shared/apache-modules/counters/remove_list ''
    fi
    ;;
    
  purge | disappear | upgrade | failed-upgrade | abort-upgrade)
    # nothing to do here
    ;;
    
  abort-install)
    # fallback case, so a bit dirty
    for ap in '' -ssl -perl
    do
      [ -x /usr/sbin/apache$ap ] && apache-modconf apache$ap disable $MODULE quiet
    done
    ;;
    
  *)
    echo "$0: didn't understand being called with \`$1'" >&2
    exit 1
    ;;
esac

#DEBHELPER#

exit 0