Merge pull request #789 from pi-hole/legacy_setupVars

reflect name change of some of the variables in setupVars
This commit is contained in:
Dan Schaper 2016-10-15 11:41:58 -07:00 committed by GitHub
commit b5b240d0be

View file

@ -792,40 +792,45 @@ finalExports() {
installPihole() { installPihole() {
# Install base files and web interface # Install base files and web interface
create_pihole_user create_pihole_user
if [ ! -d "/var/www/html" ]; then if [ ! -d "/var/www/html" ]; then
mkdir -p /var/www/html mkdir -p /var/www/html
fi fi
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/www/html
chmod 775 /var/www/html chmod 775 /var/www/html
usermod -a -G ${LIGHTTPD_GROUP} pihole usermod -a -G ${LIGHTTPD_GROUP} pihole
if [ -x "$(command -v lighty-enable-mod)" ]; then if [ -x "$(command -v lighty-enable-mod)" ]; then
lighty-enable-mod fastcgi fastcgi-php > /dev/null || true lighty-enable-mod fastcgi fastcgi-php > /dev/null || true
else else
printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n" printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n"
fi fi
installScripts installScripts
installConfigs installConfigs
CreateLogFile CreateLogFile
configureSelinux configureSelinux
installPiholeWeb installPiholeWeb
installCron installCron
configureFirewall configureFirewall
finalExports finalExports
runGravity runGravity
} }
updatePihole() { updatePihole() {
# Install base files and web interface # Refactoring of install script has changed the name of a couple of variables. Sort them out here.
installScripts sed -i 's/IPv4addr/IPv4_address/g' ${setupVars}
installConfigs sed -i 's/piholeIPv6/IPv6_address/g' ${setupVars}
CreateLogFile # Source ${setupVars} for use in the rest of the functions.
configureSelinux . ${setupVars}
installPiholeWeb # Install base files and web interface
installCron installScripts
configureFirewall installConfigs
runGravity CreateLogFile
configureSelinux
installPiholeWeb
installCron
configureFirewall
runGravity
} }
configureSelinux() { configureSelinux() {
@ -868,7 +873,6 @@ update_dialogs(){
case ${UpdateCmd} in case ${UpdateCmd} in
Update) Update)
echo "::: Updating existing install" echo "::: Updating existing install"
. ${setupVars}
useUpdateVars=true useUpdateVars=true
;; ;;
Install) Install)