Fix Merge conflicts

This commit is contained in:
Adam Warner 2016-11-01 10:02:41 +00:00
commit 032e7f2819
1 changed files with 25 additions and 21 deletions

View File

@ -74,27 +74,31 @@ fi
# Compatibility # Compatibility
if [ -x "$(command -v apt-get)" ]; then if [ -x "$(command -v apt-get)" ]; then
#Debian Family #Debian Family
#Decide if php should be `php5` or just `php` (Fixes issues with Ubuntu 16.04 LTS) #############################################
phpVer="php5" PKG_MANAGER="apt-get"
apt-get install --dry-run php5 > /dev/null 2>&1 || phpVer="php" PKG_CACHE="/var/lib/apt/lists/"
############################################# UPDATE_PKG_CACHE="${PKG_MANAGER} update"
PKG_MANAGER="apt-get" PKG_UPDATE="${PKG_MANAGER} upgrade"
PKG_CACHE="/var/lib/apt/lists/" PKG_INSTALL="${PKG_MANAGER} --yes --fix-missing install"
UPDATE_PKG_CACHE="${PKG_MANAGER} update" # grep -c will return 1 retVal on 0 matches, block this throwing the set -e with an OR TRUE
PKG_UPDATE="${PKG_MANAGER} upgrade" PKG_COUNT="${PKG_MANAGER} -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true"
PKG_INSTALL="${PKG_MANAGER} --yes --fix-missing install" # #########################################
# grep -c will return 1 retVal on 0 matches, block this throwing the set -e with an OR TRUE # fixes for dependancy differences
PKG_COUNT="${PKG_MANAGER} -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true" # Debian 7 doesn't have iproute2 use iproute
INSTALLER_DEPS=( apt-utils whiptail git dhcpcd5) ${PKG_MANAGER} install --dry-run iproute2 > /dev/null 2>&1 && IPROUTE_PKG="iproute2" || IPROUTE_PKG="iproute"
PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd ${phpVer}-common ${phpVer}-cgi curl unzip wget sudo netcat cron iproute2 ) # Ubuntu 16.04 LTS php / php5 fix
LIGHTTPD_USER="www-data" ${PKG_MANAGER} install --dry-run php5 > /dev/null 2>&1 && phpVer="php5" || phpVer="php"
LIGHTTPD_GROUP="www-data" # #########################################
LIGHTTPD_CFG="lighttpd.conf.debian" INSTALLER_DEPS=( apt-utils whiptail git dhcpcd5)
DNSMASQ_USER="dnsmasq" PIHOLE_DEPS=( dnsutils bc dnsmasq lighttpd ${phpVer}-common ${phpVer}-cgi curl unzip wget sudo netcat cron ${IPROUTE_PKG} )
package_check_install() { LIGHTTPD_USER="www-data"
dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed" || ${PKG_INSTALL} "${1}" LIGHTTPD_GROUP="www-data"
} LIGHTTPD_CFG="lighttpd.conf.debian"
DNSMASQ_USER="dnsmasq"
package_check_install() {
dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed" || ${PKG_INSTALL} "${1}"
}
elif [ -x "$(command -v rpm)" ]; then elif [ -x "$(command -v rpm)" ]; then
# Fedora Family # Fedora Family
if [ -x "$(command -v dnf)" ]; then if [ -x "$(command -v dnf)" ]; then