Clean up bash script formatting

Done with the help of beautysh (a python-based bash formatter)

Signed-off-by: jbzdarkid <jbzdarkid@gmail.com>
This commit is contained in:
jbzdarkid 2021-11-24 22:41:40 -08:00 committed by Joseph Blackman
parent b750b01acc
commit bc8150adfa
10 changed files with 339 additions and 339 deletions

View file

@ -127,5 +127,5 @@ upgrade_gravityDB(){
echo -e " ${INFO} Upgrading gravity database from version 14 to 15"
sqlite3 "${database}" < "${scriptPath}/14_to_15.sql"
version=15
fi
fi
}

View file

@ -292,7 +292,7 @@ ProcessDomainList
# Used on web interface
if $web; then
echo "DONE"
echo "DONE"
fi
if [[ ${reload} == true && ${noReloadRequested} == false ]]; then

View file

@ -261,8 +261,8 @@ os_check() {
# Compatibility
package_manager_detect() {
# First check to see if apt-get is installed.
if is_command apt-get ; then
# First check to see if apt-get is installed.
if is_command apt-get ; then
# Set some global variables here
# We don't set them earlier since the installed package manager might be rpm, so these values would be different
PKG_MANAGER="apt-get"
@ -318,8 +318,8 @@ if is_command apt-get ; then
return 0
}
# If apt-get is not found, check for rpm.
elif is_command rpm ; then
# If apt-get is not found, check for rpm.
elif is_command rpm ; then
# Then check if dnf or yum is the package manager
if is_command dnf ; then
PKG_MANAGER="dnf"
@ -338,22 +338,22 @@ elif is_command rpm ; then
LIGHTTPD_GROUP="lighttpd"
LIGHTTPD_CFG="lighttpd.conf.fedora"
# If neither apt-get or yum/dnf package managers were found
else
# If neither apt-get or yum/dnf package managers were found
else
# we cannot install required packages
printf " %b No supported package manager found\\n" "${CROSS}"
# so exit the installer
exit
fi
fi
}
select_rpm_php(){
# If the host OS is Fedora,
if grep -qiE 'fedora|fedberry' /etc/redhat-release; then
# If the host OS is Fedora,
if grep -qiE 'fedora|fedberry' /etc/redhat-release; then
# all required packages should be available by default with the latest fedora release
: # continue
# or if host OS is CentOS,
elif grep -qiE 'centos|scientific' /etc/redhat-release; then
# or if host OS is CentOS,
elif grep -qiE 'centos|scientific' /etc/redhat-release; then
# Pi-Hole currently supports CentOS 7+ with PHP7+
SUPPORTED_CENTOS_VERSION=7
SUPPORTED_CENTOS_PHP_VERSION=7
@ -427,8 +427,8 @@ elif grep -qiE 'centos|scientific' /etc/redhat-release; then
else
printf " %b Continuing installation with unsupported RPM based distribution\\n" "${INFO}"
fi
fi
fi
fi
fi
}
# A function for checking if a directory is a git repository
@ -629,12 +629,12 @@ welcomeDialogs() {
IMPORTANT: If you have not already done so, you must ensure that this device has a static IP. Either through DHCP reservation, or by manually assigning one. Depending on your operating system, there are many ways to achieve this.
Choose yes to indicate that you have understood this message, and wish to continue" "${r}" "${c}"; then
#Nothing to do, continue
#Nothing to do, continue
echo
else
else
printf " %b Installer exited at static IP message.\\n" "${INFO}"
exit 1
fi
fi
}
# A function that lets the user pick an interface to use with Pi-hole