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

Google Style Guide. readonly and cap constants.

This commit is contained in:
Dan Schaper 2016-11-01 11:36:44 -07:00
parent ffbfadbccf
commit 1991ee7a7d

View File

@ -14,10 +14,10 @@
# Variables
webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
webInterfaceDir="/var/www/html/admin"
piholeGitUrl="https://github.com/pi-hole/pi-hole.git"
piholeFilesDir="/etc/.pihole"
readonly WEBINTERFACEGITURL="https://github.com/pi-hole/AdminLTE.git"
readonly WEBINTERFACEDIR="/var/www/html/admin"
readonly PIHOLEGITURL="https://github.com/pi-hole/pi-hole.git"
readonly PIHOLEFILESDIR="/etc/.pihole"
spinner() {
local pid=${1}
@ -117,7 +117,7 @@ if [[ "${piholeVersion}" == "${piholeVersionLatest}" ]] && [[ "${webVersion}" ==
elif [[ "${piholeVersion} == ${piholeVersionLatest}" ]] && [[ "${webVersion}" != "${webVersionLatest}" ]]; then
echo "::: Pi-hole Web Admin files out of date"
getGitFiles "${webInterfaceDir}" "${webInterfaceGitUrl}"
getGitFiles "${WEBINTERFACEDIR}" "${WEBINTERFACEGITURL}"
echo ":::"
webVersion=$(pihole -v -a -c)
echo "::: Web Admin version is now at ${webVersion}"
@ -125,7 +125,7 @@ elif [[ "${piholeVersion} == ${piholeVersionLatest}" ]] && [[ "${webVersion}" !=
echo ""
elif [[ "${piholeVersion}" != "${piholeVersionLatest}" ]] && [[ "${webVersion}" == "${webVersionLatest}" ]]; then
echo "::: Pi-hole core files out of date"
getGitFiles "${piholeFilesDir}" "${piholeGitUrl}"
getGitFiles "${PIHOLEFILESDIR}" "${PIHOLEGITURL}"
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended
echo ":::"
piholeVersion=$(pihole -v -p -c)
@ -134,7 +134,7 @@ elif [[ "${piholeVersion}" != "${piholeVersionLatest}" ]] && [[ "${webVersion}"
echo ""
elif [[ "${piholeVersion}" != "${piholeVersionLatest}" ]] && [[ "${webVersion}" != "${webVersionLatest}" ]]; then
echo "::: Updating Everything"
getGitFiles "${piholeFilesDir}" "${piholeGitUrl}"
getGitFiles "${PIHOLEFILESDIR}" "${PIHOLEGITURL}"
/etc/.pihole/automated\ install/basic-install.sh --unattended
# Checks Pi-hole version > admin only > current local git repo version : returns string in format vX.X.X