File: debian-edu-router-plugin.krb5-connector.postrm

package info (click to toggle)
debian-edu-router 2.13.5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,616 kB
  • sloc: sh: 12,562; perl: 74; makefile: 35
file content (80 lines) | stat: -rwxr-xr-x 2,678 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
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
#!/bin/bash

# Copyright (C) 2024 Pädagogisches Landesinstitut Rheinland-Pfalz
# Copyright (C) 2024 Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

# postrm script for debian-edu-router-plugin.krb5-connector

set -e

. /usr/share/debconf/confmodule || exit 255

# prepare debconf
export DC_PRIO_LOW="medium"
export DC_PRIO_HIGH="high"

if [ -e /etc/debian-edu/router.conf ]; then
	source /etc/debian-edu/router.conf
fi
PRODUCTNAME="${PRODUCTNAME:-"Debian Edu Router"}"
PRODUCTNAME_PLUGIN_SUFFIX="${PRODUCTNAME_PLUGIN_SUFFIX:-"Plugin"}"
PRODUCTNAME_PLUGIN="${PRODUCTNAME_PLUGIN:-"${PRODUCTNAME} ${PRODUCTNAME_PLUGIN_SUFFIX}: Krb5 Connector"}"
db_title "${PRODUCTNAME_PLUGIN}"

# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <overwriter>
#          <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

case "${1}" in
	'purge')
		rm -fv /var/lib/debian-edu-router/d-e-r-p.k-c/enabled

		rm -fv /etc/squid/conf.d/debian-edu-router-plugin.content-filter/??_*d-e-r-p.k-c_*.conf
		rm -fv /etc/squid/snippets.d/??_*d-e-r-p.k-c.conf

		;;
	'remove'|'failed-upgrade'|'abort-install'|'abort-upgrade'|'disappear')
		rm -fv /var/lib/debian-edu-router/d-e-r-p.k-c/enabled

		rm -fv /etc/squid/conf.d/debian-edu-router-plugin.content-filter/??_*d-e-r-p.k-c_*.conf
		rm -fv /etc/squid/snippets.d/??_*d-e-r-p.k-c.conf
		;;
	'upgrade')
		echo > /dev/null
		;;
	*)
		echo "postrm called with unknown argument '${1}'" >&2
		exit '1'
		;;
esac

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

#DEBHELPER#

exit '0'