]>
Commit | Line | Data |
---|---|---|
328c390e DM |
1 | #! /bin/sh |
2 | # postrm script for vzctl | |
3 | # | |
4 | # see: dh_installdeb(1) | |
5 | ||
6 | set -e | |
7 | ||
8 | # summary of how this script can be called: | |
9 | # * <postrm> `remove' | |
10 | # * <postrm> `purge' | |
11 | # * <old-postrm> `upgrade' <new-version> | |
12 | # * <new-postrm> `failed-upgrade' <old-version> | |
13 | # * <new-postrm> `abort-install' | |
14 | # * <new-postrm> `abort-install' <old-version> | |
15 | # * <new-postrm> `abort-upgrade' <old-version> | |
16 | # * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> | |
17 | # for details, see http://www.debian.org/doc/debian-policy/ or | |
18 | # the debian-policy package | |
19 | ||
20 | case "$1" in | |
21 | purge) | |
22 | update-rc.d -f vz remove >/dev/null | |
23 | update-rc.d -f vzeventd remove >/dev/null | |
24 | # purge ve-configs | |
25 | rm -rf \ | |
26 | /etc/vz/conf \ | |
27 | /etc/vz/names | |
28 | # purge ve-folders | |
29 | rm -rf \ | |
30 | /var/lib/vz/private \ | |
31 | /var/lib/vz/root | |
32 | # remove old cron, when exist | |
33 | rm -f \ | |
34 | /etc/cron.d/vpsnetclean \ | |
35 | /etc/cron.d/vpsreboot \ | |
36 | /etc/cron.d/vpsnetclean,disabled \ | |
37 | /etc/cron.d/vpsreboot,disabled \ | |
38 | /etc/cron.d/vz | |
39 | # remove /vz link | |
40 | # rm -rf /vz | |
41 | ;; | |
42 | remove) | |
43 | ldconfig | |
44 | ;; | |
45 | ||
46 | upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | |
47 | ;; | |
48 | *) | |
49 | echo "postrm called with unknown argument \`$1'" >&2 | |
50 | exit 1 | |
51 | ;; | |
52 | ||
53 | esac | |
54 | ||
55 | # dh_installdeb will replace this with shell code automatically | |
56 | # generated by other debhelper scripts. | |
57 | ||
58 | #DEBHELPER# | |
59 | ||
60 | exit 0 |