This file is indexed.

postrm is in sympa 6.1.17~dfsg-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  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
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/sh

set -e

if [ -f /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
fi

if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
	. /usr/share/dbconfig-common/dpkg/postrm
	dbc_go sympa $@
fi

# Remove conffiles used by apache2 < 2.4
if which dpkg-maintscript-helper >/dev/null && dpkg-maintscript-helper supports rm_conffile ; then
	for i in apache apache-soap httpd.conf-cgi httpd.conf-fcgi ; do
		dpkg-maintscript-helper rm_conffile "/etc/sympa/${i}" \
			"6.1.17~dfsg-1~" -- "$@"
	done
fi

if [ "$1" = "remove" ]; then
	# Check whether the syslog configuration file is present in case
	# another system log daemon is used instead of syslog
	if [ -f /etc/sympa/facility ]; then
		if perl -ne '/(\S+)/ || exit 1; $ENV{facility}=$1; exit' /etc/sympa/facility \
		&& which syslog-facility >/dev/null 2>&1 \
		&& [ -e /etc/syslog.conf ] \
		&& syslog-facility remove "$facility" \
		&& [ -x /etc/init.d/sysklogd ]; then
			if which invoke-rc.d >/dev/null 2>&1; then
				invoke-rc.d sysklogd reload
			else
				etc/init.d/sysklogd reload
			fi
		fi
		rm -f /etc/sympa/facility
	fi
	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
		# Apache2 >= 2.4
		. /usr/share/apache2/apache2-maintscript-helper
		apache2_invoke disconf sympa.conf
		apache2_invoke disconf sympa-soap.conf
	fi
fi

if [ "$1" = "purge" ]; then
	db_input high wwsympa/remove_spool || true
	db_go
	db_get wwsympa/remove_spool
	remove_archives="$RET"

	if [ "$remove_archives" = "true" ]; then
		echo "Removing archives and spool subdirectories as requested..."
		rm -rf /var/lib/sympa/wwsarchive 2>/dev/null || true
		rm -rf /var/spool/sympa/wws* 2>/dev/null || true
	fi

	# Delete the log files if purging, remove aliases too.
	rm -f /var/log/sympa.log*

	# Remove static content directory
	if [ -d /var/lib/sympa/static_content ]; then
		rm -r /var/lib/sympa/static_content
	fi

	if [ -f /etc/aliases ]; then
		sed -i -e '/#-- SYMPA begin/,/#-- SYMPA end/d' /etc/aliases
		newaliases || true
	fi

	rm -f /etc/sympa/cookie 2>/dev/null || true
	rm -f /etc/sympa/cookies.history

	# Remove configuration files
	rm -f /etc/sympa/data_structure.version
	rm -f /etc/sympa/data_structure.version.debian-old
	rm -f /etc/sympa/sympa.conf
	rm -f /etc/sympa/wwsympa.conf

	# Try to remove if empty
	rmdir /etc/sympa 2>/dev/null || true

	db_input high sympa/remove_spool || true
	db_go
	db_get sympa/remove_spool
	remove_spool="$RET"

	if [ "$remove_spool" = "true" ]; then
		echo "Removing lists data and spool directory as requested..."
		rm -rf /var/lib/sympa 2>/dev/null || true
		rm -rf /var/spool/sympa 2>/dev/null || true
	fi
fi

# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
	db_purge
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
	update-rc.d sympa remove >/dev/null
fi


# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section


exit 0