mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #4085 from jbzdarkid/patch-3
Clean up bash script formatting
This commit is contained in:
commit
671fcaffc3
@ -127,5 +127,5 @@ upgrade_gravityDB(){
|
|||||||
echo -e " ${INFO} Upgrading gravity database from version 14 to 15"
|
echo -e " ${INFO} Upgrading gravity database from version 14 to 15"
|
||||||
sqlite3 "${database}" < "${scriptPath}/14_to_15.sql"
|
sqlite3 "${database}" < "${scriptPath}/14_to_15.sql"
|
||||||
version=15
|
version=15
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ ProcessDomainList
|
|||||||
|
|
||||||
# Used on web interface
|
# Used on web interface
|
||||||
if $web; then
|
if $web; then
|
||||||
echo "DONE"
|
echo "DONE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${reload} == true && ${noReloadRequested} == false ]]; then
|
if [[ ${reload} == true && ${noReloadRequested} == false ]]; then
|
||||||
|
@ -261,8 +261,8 @@ os_check() {
|
|||||||
|
|
||||||
# Compatibility
|
# Compatibility
|
||||||
package_manager_detect() {
|
package_manager_detect() {
|
||||||
# First check to see if apt-get is installed.
|
# First check to see if apt-get is installed.
|
||||||
if is_command apt-get ; then
|
if is_command apt-get ; then
|
||||||
# Set some global variables here
|
# 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
|
# We don't set them earlier since the installed package manager might be rpm, so these values would be different
|
||||||
PKG_MANAGER="apt-get"
|
PKG_MANAGER="apt-get"
|
||||||
@ -318,8 +318,8 @@ if is_command apt-get ; then
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# If apt-get is not found, check for rpm.
|
# If apt-get is not found, check for rpm.
|
||||||
elif is_command rpm ; then
|
elif is_command rpm ; then
|
||||||
# Then check if dnf or yum is the package manager
|
# Then check if dnf or yum is the package manager
|
||||||
if is_command dnf ; then
|
if is_command dnf ; then
|
||||||
PKG_MANAGER="dnf"
|
PKG_MANAGER="dnf"
|
||||||
@ -338,22 +338,22 @@ elif is_command rpm ; then
|
|||||||
LIGHTTPD_GROUP="lighttpd"
|
LIGHTTPD_GROUP="lighttpd"
|
||||||
LIGHTTPD_CFG="lighttpd.conf.fedora"
|
LIGHTTPD_CFG="lighttpd.conf.fedora"
|
||||||
|
|
||||||
# If neither apt-get or yum/dnf package managers were found
|
# If neither apt-get or yum/dnf package managers were found
|
||||||
else
|
else
|
||||||
# we cannot install required packages
|
# we cannot install required packages
|
||||||
printf " %b No supported package manager found\\n" "${CROSS}"
|
printf " %b No supported package manager found\\n" "${CROSS}"
|
||||||
# so exit the installer
|
# so exit the installer
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
select_rpm_php(){
|
select_rpm_php(){
|
||||||
# If the host OS is Fedora,
|
# If the host OS is Fedora,
|
||||||
if grep -qiE 'fedora|fedberry' /etc/redhat-release; then
|
if grep -qiE 'fedora|fedberry' /etc/redhat-release; then
|
||||||
# all required packages should be available by default with the latest fedora release
|
# all required packages should be available by default with the latest fedora release
|
||||||
: # continue
|
: # continue
|
||||||
# or if host OS is CentOS,
|
# or if host OS is CentOS,
|
||||||
elif grep -qiE 'centos|scientific' /etc/redhat-release; then
|
elif grep -qiE 'centos|scientific' /etc/redhat-release; then
|
||||||
# Pi-Hole currently supports CentOS 7+ with PHP7+
|
# Pi-Hole currently supports CentOS 7+ with PHP7+
|
||||||
SUPPORTED_CENTOS_VERSION=7
|
SUPPORTED_CENTOS_VERSION=7
|
||||||
SUPPORTED_CENTOS_PHP_VERSION=7
|
SUPPORTED_CENTOS_PHP_VERSION=7
|
||||||
@ -427,8 +427,8 @@ elif grep -qiE 'centos|scientific' /etc/redhat-release; then
|
|||||||
else
|
else
|
||||||
printf " %b Continuing installation with unsupported RPM based distribution\\n" "${INFO}"
|
printf " %b Continuing installation with unsupported RPM based distribution\\n" "${INFO}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# A function for checking if a directory is a git repository
|
# 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.
|
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
|
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
|
echo
|
||||||
else
|
else
|
||||||
printf " %b Installer exited at static IP message.\\n" "${INFO}"
|
printf " %b Installer exited at static IP message.\\n" "${INFO}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# A function that lets the user pick an interface to use with Pi-hole
|
# A function that lets the user pick an interface to use with Pi-hole
|
||||||
|
Loading…
Reference in New Issue
Block a user