mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Removes empty comment lines in basic-install.sh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
9cd674b528
commit
1877128fc4
1 changed files with 1 additions and 27 deletions
|
@ -1015,20 +1015,14 @@ setDNS() {
|
||||||
if [[ ! "${PIHOLE_DNS_1}" ]]; then
|
if [[ ! "${PIHOLE_DNS_1}" ]]; then
|
||||||
# and second upstream servers do not exist
|
# and second upstream servers do not exist
|
||||||
if [[ ! "${PIHOLE_DNS_2}" ]]; then
|
if [[ ! "${PIHOLE_DNS_2}" ]]; then
|
||||||
#
|
|
||||||
prePopulate=""
|
prePopulate=""
|
||||||
# Otherwise,
|
# Otherwise,
|
||||||
else
|
else
|
||||||
#
|
|
||||||
prePopulate=", ${PIHOLE_DNS_2}"
|
prePopulate=", ${PIHOLE_DNS_2}"
|
||||||
fi
|
fi
|
||||||
#
|
|
||||||
elif [[ "${PIHOLE_DNS_1}" ]] && [[ ! "${PIHOLE_DNS_2}" ]]; then
|
elif [[ "${PIHOLE_DNS_1}" ]] && [[ ! "${PIHOLE_DNS_2}" ]]; then
|
||||||
#
|
|
||||||
prePopulate="${PIHOLE_DNS_1}"
|
prePopulate="${PIHOLE_DNS_1}"
|
||||||
#
|
|
||||||
elif [[ "${PIHOLE_DNS_1}" ]] && [[ "${PIHOLE_DNS_2}" ]]; then
|
elif [[ "${PIHOLE_DNS_1}" ]] && [[ "${PIHOLE_DNS_2}" ]]; then
|
||||||
#
|
|
||||||
prePopulate="${PIHOLE_DNS_1}, ${PIHOLE_DNS_2}"
|
prePopulate="${PIHOLE_DNS_1}, ${PIHOLE_DNS_2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1563,13 +1557,10 @@ notify_package_updates_available() {
|
||||||
updatesToInstall=$(eval "${PKG_COUNT}")
|
updatesToInstall=$(eval "${PKG_COUNT}")
|
||||||
|
|
||||||
if [[ -d "/lib/modules/$(uname -r)" ]]; then
|
if [[ -d "/lib/modules/$(uname -r)" ]]; then
|
||||||
#
|
|
||||||
if [[ "${updatesToInstall}" -eq 0 ]]; then
|
if [[ "${updatesToInstall}" -eq 0 ]]; then
|
||||||
#
|
|
||||||
echo -e "${OVER} ${TICK} ${str}... up to date!"
|
echo -e "${OVER} ${TICK} ${str}... up to date!"
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
#
|
|
||||||
echo -e "${OVER} ${TICK} ${str}... ${updatesToInstall} updates available"
|
echo -e "${OVER} ${TICK} ${str}... ${updatesToInstall} updates available"
|
||||||
echo -e " ${INFO} ${COL_LIGHT_GREEN}It is recommended to update your OS after installing the Pi-hole! ${COL_NC}"
|
echo -e " ${INFO} ${COL_LIGHT_GREEN}It is recommended to update your OS after installing the Pi-hole! ${COL_NC}"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -1610,45 +1601,33 @@ install_dependent_packages() {
|
||||||
# For each package,
|
# For each package,
|
||||||
for i in "${argArray1[@]}"; do
|
for i in "${argArray1[@]}"; do
|
||||||
echo -ne " ${INFO} Checking for $i..."
|
echo -ne " ${INFO} Checking for $i..."
|
||||||
#
|
|
||||||
if dpkg-query -W -f='${Status}' "${i}" 2>/dev/null | grep "ok installed" &> /dev/null; then
|
if dpkg-query -W -f='${Status}' "${i}" 2>/dev/null | grep "ok installed" &> /dev/null; then
|
||||||
#
|
|
||||||
echo -e "${OVER} ${TICK} Checking for $i"
|
echo -e "${OVER} ${TICK} Checking for $i"
|
||||||
else
|
else
|
||||||
#
|
|
||||||
echo -e "${OVER} ${INFO} Checking for $i (will be installed)"
|
echo -e "${OVER} ${INFO} Checking for $i (will be installed)"
|
||||||
#
|
|
||||||
installArray+=("${i}")
|
installArray+=("${i}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#
|
|
||||||
if [[ "${#installArray[@]}" -gt 0 ]]; then
|
if [[ "${#installArray[@]}" -gt 0 ]]; then
|
||||||
#
|
|
||||||
test_dpkg_lock
|
test_dpkg_lock
|
||||||
#
|
|
||||||
debconf-apt-progress -- "${PKG_INSTALL[@]}" "${installArray[@]}"
|
debconf-apt-progress -- "${PKG_INSTALL[@]}" "${installArray[@]}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
#
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Fedora/CentOS packages
|
# Install Fedora/CentOS packages
|
||||||
for i in "${argArray1[@]}"; do
|
for i in "${argArray1[@]}"; do
|
||||||
echo -ne " ${INFO} Checking for $i..."
|
echo -ne " ${INFO} Checking for $i..."
|
||||||
#
|
|
||||||
if ${PKG_MANAGER} -q list installed "${i}" &> /dev/null; then
|
if ${PKG_MANAGER} -q list installed "${i}" &> /dev/null; then
|
||||||
echo -e "${OVER} ${TICK} Checking for $i"
|
echo -e "${OVER} ${TICK} Checking for $i"
|
||||||
else
|
else
|
||||||
echo -e "${OVER} ${INFO} Checking for $i (will be installed)"
|
echo -e "${OVER} ${INFO} Checking for $i (will be installed)"
|
||||||
#
|
|
||||||
installArray+=("${i}")
|
installArray+=("${i}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#
|
|
||||||
if [[ "${#installArray[@]}" -gt 0 ]]; then
|
if [[ "${#installArray[@]}" -gt 0 ]]; then
|
||||||
#
|
|
||||||
"${PKG_INSTALL[@]}" "${installArray[@]}" &> /dev/null
|
"${PKG_INSTALL[@]}" "${installArray[@]}" &> /dev/null
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -2571,7 +2550,7 @@ main() {
|
||||||
# DNSStubListener needs to remain in place for installer to download needed files,
|
# DNSStubListener needs to remain in place for installer to download needed files,
|
||||||
# so this change needs to be made after installation is complete,
|
# so this change needs to be made after installation is complete,
|
||||||
# but before starting or restarting the FTLDNS service
|
# but before starting or restarting the FTLDNS service
|
||||||
if [[ $systemd_resolved_flag = "true" ]]; then
|
if [[ $systemd_resolved_flag = "true" ]]; then
|
||||||
disable_resolved_stublistener
|
disable_resolved_stublistener
|
||||||
fi
|
fi
|
||||||
# Check for dnsmasq flag and disable dnsmasq before starting FTLDNS
|
# Check for dnsmasq flag and disable dnsmasq before starting FTLDNS
|
||||||
|
@ -2606,7 +2585,6 @@ main() {
|
||||||
/opt/pihole/updatecheck.sh
|
/opt/pihole/updatecheck.sh
|
||||||
/opt/pihole/updatecheck.sh x remote
|
/opt/pihole/updatecheck.sh x remote
|
||||||
|
|
||||||
#
|
|
||||||
if [[ "${useUpdateVars}" == false ]]; then
|
if [[ "${useUpdateVars}" == false ]]; then
|
||||||
displayFinalMessage "${pw}"
|
displayFinalMessage "${pw}"
|
||||||
fi
|
fi
|
||||||
|
@ -2621,7 +2599,6 @@ main() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
|
||||||
if [[ "${useUpdateVars}" == false ]]; then
|
if [[ "${useUpdateVars}" == false ]]; then
|
||||||
# If the Web interface was installed,
|
# If the Web interface was installed,
|
||||||
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||||
|
@ -2633,10 +2610,8 @@ main() {
|
||||||
[[ -n "${IPV4_ADDRESS%/*}" ]] && echo -e " ${INFO} Pi-hole DNS (IPv4): ${IPV4_ADDRESS%/*}"
|
[[ -n "${IPV4_ADDRESS%/*}" ]] && echo -e " ${INFO} Pi-hole DNS (IPv4): ${IPV4_ADDRESS%/*}"
|
||||||
[[ -n "${IPV6_ADDRESS}" ]] && echo -e " ${INFO} Pi-hole DNS (IPv6): ${IPV6_ADDRESS}"
|
[[ -n "${IPV6_ADDRESS}" ]] && echo -e " ${INFO} Pi-hole DNS (IPv6): ${IPV6_ADDRESS}"
|
||||||
echo -e " ${INFO} If you set a new IP address, please restart the server running the Pi-hole"
|
echo -e " ${INFO} If you set a new IP address, please restart the server running the Pi-hole"
|
||||||
#
|
|
||||||
INSTALL_TYPE="Installation"
|
INSTALL_TYPE="Installation"
|
||||||
else
|
else
|
||||||
#
|
|
||||||
INSTALL_TYPE="Update"
|
INSTALL_TYPE="Update"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2650,7 +2625,6 @@ main() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
if [[ "${PH_TEST}" != true ]] ; then
|
if [[ "${PH_TEST}" != true ]] ; then
|
||||||
main "$@"
|
main "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue