equal
deleted
inserted
replaced
1 #!/bin/bash |
|
2 # postrm script for ha-sync |
|
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' <overwriter> |
|
17 # <overwriter-version> |
|
18 # for details, see http://www.debian.org/doc/debian-policy/ or |
|
19 # the debian-policy package |
|
20 |
|
21 |
|
22 case "$1" in |
|
23 |
|
24 purge) |
|
25 { |
|
26 rm -f /etc/ha-sync/id_rsa{,.pub} |
|
27 for p in /etc/ha-sync/{ha-sync.conf,exclude}; do |
|
28 ucf --purge $p; rm -f $p $p.ucf-* |
|
29 ucf --purge $p; rm -f $p $p.ucf-* |
|
30 done |
|
31 } >&2 |
|
32 ;; |
|
33 |
|
34 remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
|
35 { |
|
36 update-rc.d ha-hostname remove >/dev/null |
|
37 update-rc.d ha-config remove >/dev/null |
|
38 } >&2 |
|
39 ;; |
|
40 |
|
41 *) |
|
42 echo "postrm called with unknown argument \`$1'" >&2 |
|
43 exit 1 |
|
44 ;; |
|
45 esac |
|
46 |
|
47 # dh_installdeb will replace this with shell code automatically |
|
48 # generated by other debhelper scripts. |
|
49 |
|
50 # #DEBHELPER# |
|
51 |
|
52 exit 0 |
|
53 |
|
54 |
|