File: postrm

package info (click to toggle)
jwchat 1.0beta2-13
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,200 kB
  • ctags: 405
  • sloc: xml: 462; sh: 80; makefile: 6
file content (42 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
# 
# prerm script for jwchat
#

set -e

configfile='/etc/jwchat/config.js'
apachefile='/etc/apache2/sites-available/jwchat'

case "$1" in
	remove)

	if [ -x /usr/sbin/a2dissite -a -x /etc/init.d/apache2 -a -L /etc/apache2/sites-enabled/jwchat ]; then
		a2dissite jwchat
		invoke-rc.d apache2 force-reload
	fi
	;;

	purge)
		
	if [ -x /usr/bin/ucf ] ; then 
		ucf --purge $configfile
		ucf --purge $apachefile
		rm -f $configfile $apachefile
	fi
	;;

	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
	;;

	*)
	echo "prerm called with unknown argument \`$1'" >&2
	exit 1
	;;
esac

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

#DEBHELPER#