mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
24 lines
600 B
Bash
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
|