1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Remove v1 legacy detection code.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2016-12-20 17:50:44 -08:00
parent a9cb93d801
commit 8117ec8e20
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

View File

@ -62,7 +62,7 @@ else
echo ":::"
echo "::: Detecting the presence of the sudo utility for continuation of this install..."
if [ -x "$(command -v sudo)" ]; then
if command -v sudo; then
echo "::: Utility sudo located."
exec curl -sSL https://install.pi-hole.net | sudo bash "$@"
exit $?
@ -74,7 +74,7 @@ fi
# Compatibility
if [[ $(command -v apt-get) ]]; then
if command -v apt-get; then
#Debian Family
#############################################
PKG_MANAGER="apt-get"
@ -101,9 +101,9 @@ if [[ $(command -v apt-get) ]]; then
package_check_install() {
dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed" || ${PKG_INSTALL} "${1}"
}
elif [ $(command -v rpm) ]; then
elif command -v rpm; then
# Fedora Family
if [ $(command -v dnf) ]; then
if command -v dnf; then
PKG_MANAGER="dnf"
else
PKG_MANAGER="yum"
@ -623,16 +623,6 @@ version_check_dnsmasq() {
fi
}
remove_legacy_scripts() {
#Tidy up /usr/local/bin directory if installing over previous install.
oldFiles=( gravity chronometer whitelist blacklist piholeLogFlush updateDashboard uninstall setupLCD piholeDebug)
for i in "${oldFiles[@]}"; do
if [ -f "/usr/local/bin/$i.sh" ]; then
rm /usr/local/bin/"$i".sh
fi
done
}
clean_existing() {
# Clean an exiting installation to prepare for upgrade/reinstall
# ${1} Directory to clean; ${2} Array of files to remove