File: prerm

package info (click to toggle)
libapache-mod-fastcgi 2.4.2-8
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 568 kB
  • ctags: 576
  • sloc: ansic: 6,200; sh: 276; makefile: 55
file content (78 lines) | stat: -rw-r--r-- 1,949 bytes parent folder | download | duplicates (6)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# vim: set ts=2 sw=2 et:

set -e

# These functions comment out the LoadModule directive in httpd.conf
# for apache/apache-ssl.  They also ask the user whether to restart
# apache/apache-ssl.
killconf () {
  src=/etc/apache/httpd.conf
  dst=/etc/apache/httpd.conf.tmp.$$
  if [ -s $src ] ; then
    sed 's/^\(LoadModule.*mod_fastcgi\.so\)/# \1/' $src > $dst
    mv -f $dst $src
    ask_restart
  fi
}
killconfssl () {
  src=/etc/apache-ssl/httpd.conf
  dst=/etc/apache-ssl/httpd.conf.tmp.$$
  if [ -s $src ] ; then
    sed 's/^\(LoadModule.*mod_fastcgi\.so\)/# \1/' $src > $dst
    mv -f $src $dst
    ask_restartssl
  fi
}

# These functions ask the user whether to restart apache/apachessl.
ask_restart () {
  echo -n "An Apache module has been modified.  Restart apache [Y/n]? "
  read CONFIG
  if [ ".$CONFIG" != ".n" -a ".$CONFIG" != ".N" ]
  then
    if [ -x /usr/sbin/apachectl ]; then
      /usr/sbin/apachectl restart || true
    else
      echo 'apachectl not found.'
    fi
  fi
}
ask_restartssl () {
  echo -n "An Apache module has been modified.  Restart apache-ssl [Y/n]? "
  read CONFIG
  if [ ".$CONFIG" != ".n" -a ".$CONFIG" != ".N" ] ; then
    if [ -x /usr/sbin/apache-sslctl ]; then
      /usr/sbin/apache-sslctl restart || true
    else
      echo 'apache-sslctl not found.'
    fi
  fi
}        

# This script is called twice during the removal of the package; once
# after the removal of the package's files from the system, and as
# the final step in the removal of this package, after the package's
# conffiles have been removed.

case "$1" in
  remove)
    # This package has been removed, but its configuration has not yet
    # been purged.
    killconf
    killconfssl
    :
    ;;
  upgrade | deconfigure | failed-upgrade)
    # I _think_ I'm right here...let it sit on an upgrade.
    :
    ;;
  *)
    echo "$0: didn't understand being called with \`$1'" 1>&2
    exit 1
    ;;
esac

exit 0

#DEBHELPER#