2 # vim: set ts=2 sw=2 et:
6 # These functions ask the user whether to reconfigure apache/apachessl.
8 if [ -s /etc
/apache
/httpd.conf
] ; then
9 if grep '^LoadModule.*mod_fastcgi\.so' /etc
/apache
/httpd.conf
2>&1 >/dev
/null
14 echo -n "A new Apache module has been installed. Reconfigure apache [Y/n]? "
18 echo -n "" # do nothing
21 if [ -x /usr
/sbin
/apacheconfig
] ; then
22 /usr
/sbin
/apacheconfig
--force-modules
29 if [ -s /etc
/apache-ssl
/httpd.conf
] ; then
30 if grep '^LoadModule.*mod_fastcgi\.so' /etc
/apache-ssl
/httpd.conf
2>&1 >/dev
/null
; then
34 echo -n "A new Apache module has been installed. Reconfigure apache-ssl [Y/n]? "
38 echo -n "" # do nothing
41 if [ -x /usr
/sbin
/apache-sslconfig
] ; then
42 /usr
/sbin
/apache-sslconfig
--force-modules
48 # These functions ask the user whether to restart apache/apachessl.
50 echo -n "An Apache module has been modified. Restart apache [Y/n]? "
54 echo -n "" # do nothing
57 /usr
/sbin
/apachectl restart
62 echo -n "An Apache module has been modified. Restart apache-ssl [Y/n]? "
66 echo -n "" # do nothing
69 /usr
/sbin
/apache-sslctl restart
76 # Configure this package. If the package must prompt the user for
77 # information, do it here. There are three sub-cases.
78 if [ "${2+set}" != "set" ] ; then
79 # We're being installed by an ancient dpkg which doesn't remember
80 # which version was most recently configured, or even whether
81 # there is a most recently configured version.
82 if [ -s /etc
/apache
/httpd.conf
] ; then do_enable
; fi
83 if [ -s /etc
/apache-ssl
/httpd.conf
] ; then do_enablessl
; fi
84 elif [ -z "$2" -o "$2" = "<unknown>" ] ; then
85 # The package has not ever been configured on this system, or was
86 # purged since it was last configured.
87 # DJ: So let's do_enable the module!
88 if [ -s /etc
/apache
/httpd.conf
] ; then do_enable
; fi
89 if [ -s /etc
/apache-ssl
/httpd.conf
] ; then do_enablessl
; fi
91 # Version $2 is the most recently configured version of this
93 if [ -x /usr
/sbin
/apachectl
] ; then ask_restart
; fi
94 if [ -x /usr
/sbin
/apache-sslctl
] ; then ask_restartssl
; fi
97 abort-upgrade | abort-remove | abort-deconfigure
)
100 echo "$0: didn't understand being called with \`$1'" 1>&2