Finished space conversion

Signed-off-by: Dan Schaper <dan.schaper@pihole.net>
This commit is contained in:
Dan Schaper 2018-07-05 21:48:36 -07:00
parent b087888f94
commit a323b126e5
No known key found for this signature in database
GPG key ID: B4FF14C01CC08DC0
3 changed files with 1947 additions and 1958 deletions

View file

@ -9,7 +9,7 @@ end_of_line = lf
insert_final_newline = true insert_final_newline = true
indent_style = space indent_style = space
indent_size = tab indent_size = tab
tab_width = 2 tab_width = 4
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true

View file

@ -1,11 +1,5 @@
<component name="ProjectCodeStyleConfiguration"> <component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173"> <code_scheme name="Project" version="173">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</value>
</option>
<MarkdownNavigatorCodeStyleSettings> <MarkdownNavigatorCodeStyleSettings>
<option name="RIGHT_MARGIN" value="72" /> <option name="RIGHT_MARGIN" value="72" />
</MarkdownNavigatorCodeStyleSettings> </MarkdownNavigatorCodeStyleSettings>

View file

@ -291,7 +291,6 @@ elif command -v rpm &> /dev/null; then
"${PKG_INSTALL[@]}" "yum-utils" &> /dev/null "${PKG_INSTALL[@]}" "yum-utils" &> /dev/null
yum-config-manager --enable ${REMI_REPO} &> /dev/null yum-config-manager --enable ${REMI_REPO} &> /dev/null
echo -e " ${TICK} Remi's RPM repository has been enabled for PHP7" echo -e " ${TICK} Remi's RPM repository has been enabled for PHP7"
fi fi
fi fi
fi fi
@ -302,7 +301,6 @@ elif command -v rpm &> /dev/null; then
exit exit
fi fi
# If neither apt-get or rmp/dnf are found # If neither apt-get or rmp/dnf are found
else else
# it's not an OS we can support, # it's not an OS we can support,
@ -458,7 +456,6 @@ find_IPv4_information() {
IPV4_ADDRESS=$(ip -o -f inet addr show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}') IPV4_ADDRESS=$(ip -o -f inet addr show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}')
# Get the default gateway (the way to reach the Internet) # Get the default gateway (the way to reach the Internet)
IPv4gw=$(awk '{print $3}' <<< "${route}") IPv4gw=$(awk '{print $3}' <<< "${route}")
} }
# Get available interfaces that are UP # Get available interfaces that are UP
@ -483,7 +480,6 @@ In the next section, you can choose to use your current network settings (DHCP)
# We need to make sure there is enough space before installing, so there is a function to check this # We need to make sure there is enough space before installing, so there is a function to check this
verifyFreeDiskSpace() { verifyFreeDiskSpace() {
# 50MB is the minimum space needed (45MB install (includes web admin bootstrap/jquery libraries etc) + 5MB one day of logs.) # 50MB is the minimum space needed (45MB install (includes web admin bootstrap/jquery libraries etc) + 5MB one day of logs.)
# - Fourdee: Local ensures the variable is only created, and accessible within this function/void. Generally considered a "good" coding practice for non-global variables. # - Fourdee: Local ensures the variable is only created, and accessible within this function/void. Generally considered a "good" coding practice for non-global variables.
local str="Disk space check" local str="Disk space check"
@ -2182,8 +2178,7 @@ get_binary_name() {
fi fi
} }
FTLcheckUpdate() FTLcheckUpdate() {
{
get_binary_name get_binary_name
#In the next section we check to see if FTL is already installed (in case of pihole -r). #In the next section we check to see if FTL is already installed (in case of pihole -r).
@ -2434,7 +2429,7 @@ main() {
# generate a random password # generate a random password
pw=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8) pw=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8)
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. /opt/pihole/webpage.sh /opt/pihole/webpage.sh
echo "WEBPASSWORD=$(HashPassword ${pw})" >> ${setupVars} echo "WEBPASSWORD=$(HashPassword ${pw})" >> ${setupVars}
fi fi
fi fi
@ -2467,8 +2462,8 @@ main() {
runGravity runGravity
# Force an update of the updatechecker # Force an update of the updatechecker
. /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