Merge branch 'master' of github.com:pi-hole/pi-hole into dev

This commit is contained in:
Siddhu 2019-02-13 13:27:14 +05:30
commit c5f4aa54aa
11 changed files with 137 additions and 57 deletions

View file

@ -22,9 +22,6 @@ addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/black.list
addn-hosts=/etc/pihole/local.list
user=pihole
group=pihole
domain-needed
localise-queries
@ -46,3 +43,8 @@ log-facility=/var/log/pihole.log
local-ttl=2
log-async
# If a DHCP client claims that its name is "wpad", ignore that.
# This fixes a security hole. see CERT Vulnerability VU#598349
dhcp-name-match=set:wpad-ignore,wpad
dhcp-ignore-names=tag:wpad-ignore

View file

@ -167,7 +167,7 @@ checkout() {
echo " ${TICK} Branch ${2} exists"
echo "${2}" > /etc/pihole/ftlbranch
FTLinstall "${binary}"
start_service pihole-FTL
restart_service pihole-FTL
enable_service pihole-FTL
else
echo " ${CROSS} Requested branch \"${2}\" is not available"

View file

@ -76,6 +76,7 @@ WEB_SERVER_CONFIG_DIRECTORY="/etc/lighttpd"
HTML_DIRECTORY="/var/www/html"
WEB_GIT_DIRECTORY="${HTML_DIRECTORY}/admin"
#BLOCK_PAGE_DIRECTORY="${HTML_DIRECTORY}/pihole"
SHM_DIRECTORY="/dev/shm"
# Files required by Pi-hole
# https://discourse.pi-hole.net/t/what-files-does-pi-hole-use/1684
@ -976,6 +977,9 @@ list_files_in_dir() {
[[ "${dir_to_parse}/${each_file}" == "${PIHOLE_WEB_SERVER_ACCESS_LOG_FILE}" ]] || \
[[ "${dir_to_parse}/${each_file}" == "${PIHOLE_LOG_GZIPS}" ]]; then
:
elif [[ "${dir_to_parse}" == "${SHM_DIRECTORY}" ]]; then
# SHM file - we do not want to see the content, but we want to see the files and their sizes
log_write "$(ls -ld "${dir_to_parse}"/"${each_file}")"
else
# Then, parse the file's content into an array so each line can be analyzed if need be
for i in "${!REQUIRED_FILES[@]}"; do
@ -1019,6 +1023,7 @@ show_content_of_pihole_files() {
show_content_of_files_in_dir "${CRON_D_DIRECTORY}"
show_content_of_files_in_dir "${WEB_SERVER_LOG_DIRECTORY}"
show_content_of_files_in_dir "${LOG_DIRECTORY}"
show_content_of_files_in_dir "${SHM_DIRECTORY}"
}
head_tail_log() {

View file

@ -136,8 +136,16 @@ errorOutput() {
}
defaultOutput() {
# Source the setupvars config file
# shellcheck disable=SC1091
source /etc/pihole/setupVars.conf
versionOutput "pi-hole" "$@"
versionOutput "AdminLTE" "$@"
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
versionOutput "AdminLTE" "$@"
fi
versionOutput "FTL" "$@"
}

View file

@ -45,7 +45,7 @@ Options:
-sn Run speedtest now
-sc Clear speedtest data
-ss Set custom server
-l, privacylevel Set privacy level (0 = lowest, 3 = highest)"
-l, privacylevel Set privacy level (0 = lowest, 4 = highest)"
exit 0
}
@ -336,6 +336,12 @@ dhcp-leasefile=/etc/pihole/dhcp.leases
echo "domain=${PIHOLE_DOMAIN}" >> "${dhcpconfig}"
fi
# Sourced from setupVars
# shellcheck disable=SC2154
if [[ "${DHCP_rapid_commit}" == "true" ]]; then
echo "dhcp-rapid-commit" >> "${dhcpconfig}"
fi
if [[ "${DHCP_IPv6}" == "true" ]]; then
echo "#quiet-dhcp6
#enable-ra
@ -360,6 +366,7 @@ EnableDHCP() {
change_setting "DHCP_LEASETIME" "${args[5]}"
change_setting "PIHOLE_DOMAIN" "${args[6]}"
change_setting "DHCP_IPv6" "${args[7]}"
change_setting "DHCP_rapid_commit" "${args[8]}"
# Remove possible old setting from file
delete_dnsmasq_setting "dhcp-"

View file

@ -56,7 +56,7 @@ _pihole() {
;;
"privacylevel")
if ( [[ "$prev2" == "admin" ]] || [[ "$prev2" == "-a" ]] ); then
opts_privacy="0 1 2 3"
opts_privacy="0 1 2 3 4"
COMPREPLY=( $(compgen -W "${opts_privacy}" -- ${cur}) )
else
return 1