debian/postrm
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 05 Jun 2010 03:32:57 +0200
changeset 55 02afddde7b94
parent 35 3fedae1f6ceb
permissions -rw-r--r--
changelog entry added committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
#!/bin/sh
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
# postrm script for mcbot
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
#
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
# see: dh_installdeb(1)
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
set -e
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
# summary of how this script can be called:
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
#        * <postrm> `remove'
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
#        * <postrm> `purge'
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
#        * <old-postrm> `upgrade' <new-version>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
#        * <new-postrm> `failed-upgrade' <old-version>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
#        * <new-postrm> `abort-install'
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
#        * <new-postrm> `abort-install' <old-version>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
#        * <new-postrm> `abort-upgrade' <old-version>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
#        * <disappearer's-postrm> `disappear' <overwriter>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
#          <overwriter-version>
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
# for details, see http://www.debian.org/doc/debian-policy/ or
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
# the debian-policy package
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
case "$1" in
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
    purge)
31
bbcb8a3366b4 mcbot needs a proper system account
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 26
diff changeset
    24
	rm -rf /var/lib/mcbot/data;
bbcb8a3366b4 mcbot needs a proper system account
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 26
diff changeset
    25
	rm -f /var/lib/mcbot/.mcbotrc;
bbcb8a3366b4 mcbot needs a proper system account
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 26
diff changeset
    26
	rm -f /var/lib/mcbot/mcbot-*.log;
0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
    ;;
32
89fb9c6611ca unix system accounts are less than 1000
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 31
diff changeset
    28
0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
35
3fedae1f6ceb Lintian Checks
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 32
diff changeset
    30
	update-rc.d -f mcbot remove >/dev/null 2>&1
31
bbcb8a3366b4 mcbot needs a proper system account
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 26
diff changeset
    31
	userdel mcbot
0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
	;;
32
89fb9c6611ca unix system accounts are less than 1000
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 31
diff changeset
    33
0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
    *)
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
        echo "postrm called with unknown argument \`$1'" >&2
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
        exit 1
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    37
    ;;
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    38
esac
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    39
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    40
# dh_installdeb will replace this with shell code automatically
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    41
# generated by other debhelper scripts.
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    42
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    43
#DEBHELPER#
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    44
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    45
exit 0
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    46
586472add385 Initial Layout
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    47