From 01cd056bcc661abb67799ad8dad28cc3d89fd327 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 16 Aug 2017 16:27:50 +0100 Subject: [PATCH] Work out correct SQLITE version for php-sqlite Signed-off-by: Adam Warner --- automated install/basic-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 31320182..b38f2827 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -119,10 +119,16 @@ if command -v apt-get &> /dev/null; then else phpVer="php5" fi + # We also need the correct version for `php-sqlite` (which differs across distros) + if ${PKG_MANAGER} install --dry-run ${phpVer}-sqlite3 > /dev/null 2>&1; then + phpSqlite="sqlite3" + else + phpSqlite="sqlite" + fi # ######################################### INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail) PIHOLE_DEPS=(bc cron curl dnsmasq dnsutils iputils-ping lsof netcat sudo unzip wget) - PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-sqlite) + PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite}) LIGHTTPD_USER="www-data" LIGHTTPD_GROUP="www-data" LIGHTTPD_CFG="lighttpd.conf.debian"