mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
flip uninstall compatability check
Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
parent
90239bb969
commit
d3dda443cd
1 changed files with 10 additions and 10 deletions
|
@ -53,16 +53,7 @@ if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
|
|||
fi
|
||||
|
||||
# Compatability
|
||||
if [ -x "$(command -v rpm)" ]; then
|
||||
# Fedora Family
|
||||
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
||||
package_check() {
|
||||
rpm -qa | grep ^$1- > /dev/null
|
||||
}
|
||||
package_cleanup() {
|
||||
${SUDO} ${PKG_MANAGER} -y autoremove
|
||||
}
|
||||
elif [ -x "$(command -v apt-get)" ]; then
|
||||
if [ -x "$(command -v apt-get)" ]; then
|
||||
# Debian Family
|
||||
PKG_REMOVE="${PKG_MANAGER} -y remove --purge"
|
||||
package_check() {
|
||||
|
@ -72,6 +63,15 @@ elif [ -x "$(command -v apt-get)" ]; then
|
|||
${SUDO} ${PKG_MANAGER} -y autoremove
|
||||
${SUDO} ${PKG_MANAGER} -y autoclean
|
||||
}
|
||||
elif [ -x "$(command -v rpm)" ]; then
|
||||
# Fedora Family
|
||||
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
||||
package_check() {
|
||||
rpm -qa | grep ^$1- > /dev/null
|
||||
}
|
||||
package_cleanup() {
|
||||
${SUDO} ${PKG_MANAGER} -y autoremove
|
||||
}
|
||||
else
|
||||
echo -e " ${CROSS} OS distribution not supported"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue