salt/debian/salt-common.postrm
2012-11-13 18:06:49 -08:00

24 lines
600 B
Bash

#!/bin/sh
# Purge config files, logs, and directories created after package install.
# Note that user-specified alternate locations for these are not affected.
clean_common() {
# remove shared job cache and other runtime directories
rm -rf /var/cache/salt /var/run/salt /etc/salt /var/log/salt 2> /dev/null
# XXX add more specific files to purge here XXX #
}
case "$1" in
remove)
;;
purge)
clean_common ;;
upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
;;
*)
echo "$0 unknown action \`$1'" 1>&2
exit 1 ;;
esac
exit 0