From 01429d59bd57ee731ae3eb5ca11343fa50659d87 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sat, 28 Jan 2017 15:45:14 +0000 Subject: [PATCH] more web checks --- automated install/basic-install.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 54020ecb..ae7e8c4d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -980,16 +980,19 @@ installLogrotate() { installPihole() { # Install base files and web interface create_pihole_user - if [ ! -d "/var/www/html" ]; then - mkdir -p /var/www/html - fi - chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html - chmod 775 /var/www/html - usermod -a -G ${LIGHTTPD_GROUP} pihole - if [ -x "$(command -v lighty-enable-mod)" ]; then - lighty-enable-mod fastcgi fastcgi-php > /dev/null || true - else - printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n" + + if [[ ${INSTALL_WEB} == true ]]; then + if [ ! -d "/var/www/html" ]; then + mkdir -p /var/www/html + fi + chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html + chmod 775 /var/www/html + usermod -a -G ${LIGHTTPD_GROUP} pihole + if [ -x "$(command -v lighty-enable-mod)" ]; then + lighty-enable-mod fastcgi fastcgi-php > /dev/null || true + else + printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n" + fi fi installScripts installConfigs