| 1 |
jtimberman-guest |
4006 |
#!/bin/sh |
| 2 |
|
|
# postrm script for chef |
| 3 |
|
|
# |
| 4 |
|
|
# see: dh_installdeb(1) |
| 5 |
|
|
|
| 6 |
|
|
set -e |
| 7 |
|
|
|
| 8 |
jtimberman-guest |
5392 |
TEMPLATE=/usr/share/chef/client.rb |
| 9 |
|
|
CONFIGFILE=/etc/chef/client.rb |
| 10 |
|
|
|
| 11 |
jtimberman-guest |
4006 |
case "$1" in |
| 12 |
|
|
remove) |
| 13 |
|
|
rm -rf /var/cache/chef |
| 14 |
|
|
;; |
| 15 |
|
|
purge) |
| 16 |
|
|
rm -rf /var/log/chef/client* |
| 17 |
jtimberman-guest |
5392 |
test -x /usr/bin/ucf && ucf --purge $TEMPLATEFILE $CONFIGFILE |
| 18 |
|
|
rm -rf $CONFIGFILE $CONFIGFILE.ucf-old $CONFIGFILE.ucf-new $CONFIGFILE.ucf-dist |
| 19 |
jtimberman-guest |
4006 |
;; |
| 20 |
|
|
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
| 21 |
|
|
;; |
| 22 |
|
|
|
| 23 |
|
|
*) |
| 24 |
|
|
echo "postrm called with unknown argument \`$1'" >&2 |
| 25 |
|
|
exit 1 |
| 26 |
|
|
;; |
| 27 |
|
|
esac |
| 28 |
|
|
|
| 29 |
|
|
# dh_installdeb will replace this with shell code automatically |
| 30 |
|
|
# generated by other debhelper scripts. |
| 31 |
|
|
|
| 32 |
|
|
#DEBHELPER# |
| 33 |
|
|
|
| 34 |
|
|
exit 0 |