File: postrm

package info (click to toggle)
libapache-mod-python 2%3A2.7.8-0.0woody5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,312 kB
  • ctags: 850
  • sloc: ansic: 2,782; python: 1,115; makefile: 260; sh: 246
file content (40 lines) | stat: -rw-r--r-- 1,092 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
#! /bin/sh

set -e

# function to comment us out in httpd.conf
killconf () {	
	tmpfile=/etc/apache/httpd.conf.tmp.$$
	cat /etc/apache/httpd.conf |\
		 sed 's/^LoadModule.*mod_python\.so/#&/' > $tmpfile
	mv -f $tmpfile /etc/apache/httpd.conf
}

case "$1" in
	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)	
        ;;
	remove|purge)
		# Make sure that httpd.conf exists before modifying it.
		test -e /etc/apache/httpd.conf && killconf
		# Check to see if the mod_python directory exists. If it does remove
		# all the compiled objects and try to remove the directory for a nice
		# cleanup.
# 		if [ -d /usr/lib/python2.1/site-packages/mod_python/ ] ; then
#			rm -f /usr/lib/python2.1/site-packages/mod_python/*.pyc
#			rm -f /usr/lib/python2.1/site-packages/mod_python/*.pyo
#			rmdir --ignore-fail-on-non-empty /usr/lib/python2.1/site-packages/mod_python/
#		fi
	  
	;;
	*)
        	echo "postrm called with unknown argument \`$1'" >&2
		exit 0
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#