Merge branch 'development' into tweak/gravity

This commit is contained in:
WaLLy3K 2017-08-28 03:11:38 +10:00 committed by GitHub
commit 7cac207c00
5 changed files with 18 additions and 12 deletions

View file

@ -12,10 +12,6 @@
Block ads for **all** your devices _without_ the need to install client-side software. Block ads for **all** your devices _without_ the need to install client-side software.
<p align="center">
<a href=http://www.digitalocean.com/?refcode=344d234950e1><img src="https://assets.pi-hole.net/static/DOHostingSlug.png"></a>
</p>
## Executive Summary ## Executive Summary
The Pi-hole blocks ads at the DNS-level, so all your devices are protected. The Pi-hole blocks ads at the DNS-level, so all your devices are protected.
@ -66,7 +62,7 @@ Alternatively, you can manually set each device to use Pi-hole as their DNS serv
# Pi-hole Is Free, But Powered By Your Donations # Pi-hole Is Free, But Powered By Your Donations
[Digital Ocean](http://www.digitalocean.com/?refcode=344d234950e1) helps with our infrastructure, but [our developers](https://github.com/orgs/pi-hole/people) are all volunteers so *your donations help keep us innovating*. All [our developers](https://github.com/orgs/pi-hole/people) are volunteers, so *your donations help keep us innovating*. Sending a donation using our links below helps us offset a portion of our monthly costs.
- ![Paypal](https://assets.pi-hole.net/static/paypal.png) [Donate via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3J2L3Z4DHW9UY) - ![Paypal](https://assets.pi-hole.net/static/paypal.png) [Donate via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3J2L3Z4DHW9UY)
- ![Bitcoin](https://assets.pi-hole.net/static/Bitcoin.png) Bitcoin Address: 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL - ![Bitcoin](https://assets.pi-hole.net/static/Bitcoin.png) Bitcoin Address: 1GKnevUnVaQM2pQieMyeHkpr8DXfkpfAtL

View file

@ -171,7 +171,11 @@ checkout_pull_branch() {
oldbranch="$(git symbolic-ref HEAD)" oldbranch="$(git symbolic-ref HEAD)"
str="Switching to branch: '${branch}' from '${oldbranch}'"
echo -ne " ${INFO} $str"
git checkout "${branch}" --quiet || return 1 git checkout "${branch}" --quiet || return 1
echo -e "${OVER} ${TICK} $str"
if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then
update="true" update="true"
@ -180,7 +184,7 @@ checkout_pull_branch() {
git_pull=$(git pull || return 1) git_pull=$(git pull || return 1)
if [[ "$git_pull" == *"up-to-date"* ]]; then if [[ "$git_pull" == *"up-to-date"* ]]; then
echo -e " ${INFO} $(git pull)" echo -e " ${INFO} ${git_pull}"
else else
echo -e "$git_pull\\n" echo -e "$git_pull\\n"
fi fi
@ -271,7 +275,7 @@ checkout() {
str="Fetching branches from ${piholeGitUrl}" str="Fetching branches from ${piholeGitUrl}"
echo -ne " ${INFO} $str" echo -ne " ${INFO} $str"
if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then
echo -e " ${CROSS} $str" echo -e "${OVER} ${CROSS} $str"
exit 1 exit 1
fi fi
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}")) corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
@ -298,7 +302,7 @@ checkout() {
str="Fetching branches from ${webInterfaceGitUrl}" str="Fetching branches from ${webInterfaceGitUrl}"
echo -ne " ${INFO} $str" echo -ne " ${INFO} $str"
if ! fully_fetch_repo "${webInterfaceDir}" ; then if ! fully_fetch_repo "${webInterfaceDir}" ; then
echo -e " ${CROSS} $str" echo -e "${OVER} ${CROSS} $str"
exit 1 exit 1
fi fi
webbranches=($(get_available_branches "${webInterfaceDir}")) webbranches=($(get_available_branches "${webInterfaceDir}"))

View file

@ -248,7 +248,12 @@ ProcessDHCPSettings() {
if [[ "${DHCP_LEASETIME}" == "0" ]]; then if [[ "${DHCP_LEASETIME}" == "0" ]]; then
leasetime="infinite" leasetime="infinite"
elif [[ "${DHCP_LEASETIME}" == "" ]]; then elif [[ "${DHCP_LEASETIME}" == "" ]]; then
leasetime="24h" leasetime="24"
change_setting "DHCP_LEASETIME" "${leasetime}"
elif [[ "${DHCP_LEASETIME}" == "24h" ]]; then
#Installation is affected by known bug, introduced in a previous version.
#This will automatically clean up setupVars.conf and remove the unnecessary "h"
leasetime="24"
change_setting "DHCP_LEASETIME" "${leasetime}" change_setting "DHCP_LEASETIME" "${leasetime}"
else else
leasetime="${DHCP_LEASETIME}h" leasetime="${DHCP_LEASETIME}h"

View file

@ -21,8 +21,9 @@ if ($serverName === 'pi.hole')
} }
// Retrieve server URI extension (EG: jpg, exe, php) // Retrieve server URI extension (EG: jpg, exe, php)
// strtok($uri, '\?') splits the querystring from the path (if there is a querystring)
ini_set('pcre.recursion_limit',100); ini_set('pcre.recursion_limit',100);
$uriExt = pathinfo($uri, PATHINFO_EXTENSION); $uriExt = pathinfo(strtok($uri,'\?'), PATHINFO_EXTENSION);
// Define which URL extensions get rendered as "Website Blocked" // Define which URL extensions get rendered as "Website Blocked"
$webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml'); $webExt = array('asp', 'htm', 'html', 'php', 'rss', 'xml');

View file

@ -1216,7 +1216,7 @@ install_dependent_packages() {
if command -v debconf-apt-progress &> /dev/null; then if command -v debconf-apt-progress &> /dev/null; then
# 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
# #
@ -1243,7 +1243,7 @@ install_dependent_packages() {
# 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"