Skip to content

Commit

Permalink
Merge pull request #21 from arevindh/v5.2.2
Browse files Browse the repository at this point in the history
V5.2.2
  • Loading branch information
arevindh authored Dec 25, 2020
2 parents abdf075 + 6d8dd91 commit 60a7bc5
Show file tree
Hide file tree
Showing 7 changed files with 304 additions and 37 deletions.
10 changes: 8 additions & 2 deletions advanced/Scripts/chronometer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,14 @@ get_sys_stats() {
mapfile -t ph_ver_raw < <(pihole -v -c 2> /dev/null | sed -n 's/^.* v/v/p')
if [[ -n "${ph_ver_raw[0]}" ]]; then
ph_core_ver="${ph_ver_raw[0]}"
ph_lte_ver="${ph_ver_raw[1]}"
ph_ftl_ver="${ph_ver_raw[2]}"
if [[ ${#ph_ver_raw[@]} -eq 2 ]]; then
# AdminLTE not installed
ph_lte_ver="(not installed)"
ph_ftl_ver="${ph_ver_raw[1]}"
else
ph_lte_ver="${ph_ver_raw[1]}"
ph_ftl_ver="${ph_ver_raw[2]}"
fi
else
ph_core_ver="-1"
fi
Expand Down
16 changes: 13 additions & 3 deletions advanced/Scripts/piholeDebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,17 @@ compare_local_version_to_git_version() {
return 1
fi
else
:
# There is no git directory so check if the web interface was disabled
local setup_vars_web_interface
setup_vars_web_interface=$(< ${PIHOLE_SETUP_VARS_FILE} grep ^INSTALL_WEB_INTERFACE | cut -d '=' -f2)
if [[ "${pihole_component}" == "Web" ]] && [[ "${setup_vars_web_interface}" == "false" ]]; then
log_write "${INFO} ${pihole_component}: Disabled in setupVars.conf via INSTALL_WEB_INTERFACE=false"
else
# Return an error message
log_write "${COL_RED}Directory ${git_dir} doesn't exist${COL_NC}"
# and exit with a non zero code
return 1
fi
fi
}

Expand Down Expand Up @@ -371,9 +381,9 @@ get_program_version() {
echo_current_diagnostic "${program_name} version"
# Evalutate the program we are checking, if it is any of the ones below, show the version
case "${program_name}" in
"lighttpd") program_version="$(${program_name} -v |& head -n1 | cut -d '/' -f2 | cut -d ' ' -f1)"
"lighttpd") program_version="$(${program_name} -v 2> /dev/null | head -n1 | cut -d '/' -f2 | cut -d ' ' -f1)"
;;
"php") program_version="$(${program_name} -v |& head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)"
"php") program_version="$(${program_name} -v 2> /dev/null | head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)"
;;
# If a match is not found, show an error
*) echo "Unrecognized program";
Expand Down
2 changes: 1 addition & 1 deletion advanced/Templates/gravity.db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CREATE TABLE domainlist_by_group
CREATE TABLE client
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
ip TEXT NOL NULL UNIQUE,
ip TEXT NOT NULL UNIQUE,
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
date_modified INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
comment TEXT
Expand Down
2 changes: 1 addition & 1 deletion automated install/basic-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,7 @@ get_binary_name() {
elif [[ "${machine}" == "x86_64" ]]; then
# This gives the processor of packages dpkg installs (for example, "i386")
local dpkgarch
dpkgarch=$(dpkg --print-processor 2> /dev/null || true)
dpkgarch=$(dpkg --print-processor 2> /dev/null || dpkg --print-architecture 2> /dev/null)

# Special case: This is a 32 bit OS, installed on a 64 bit machine
# -> change machine processor to download the 32 bit executable
Expand Down
2 changes: 1 addition & 1 deletion gravity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ database_table_from_file() {
echo "${rowid},\"${domain}\",${timestamp}" >> "${tmpFile}"
elif [[ "${table}" == "adlist" ]]; then
# Adlist table format
echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"
echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"," >> "${tmpFile}"
else
# White-, black-, and regexlist table format
echo "${rowid},${type},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"
Expand Down
44 changes: 42 additions & 2 deletions manpages/pihole-FTL.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "Pihole-FTL" "8" "pihole-FTL" "Pi-hole" "June 2018"
.TH "Pihole-FTL" "8" "pihole-FTL" "Pi-hole" "November 2020"
.SH "NAME"
pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
.br
Expand All @@ -10,7 +10,7 @@ pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
.br
\fBpihole-FTL test\fR
.br
\fBpihole-FTL -v\fR
\fBpihole-FTL -v|-vv\fR
.br
\fBpihole-FTL -t\fR
.br
Expand All @@ -22,6 +22,16 @@ pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
.br
\fBpihole-FTL dnsmasq-test\fR
.br
\fBpihole-FTL regex-test str\fR
.br
\fBpihole-FTL regex-test str rgx\fR
.br
\fBpihole-FTL lua\fR
.br
\fBpihole-FTL luac\fR
.br
\fBpihole-FTL dhcp-discover\fR
.br
\fBpihole-FTL --\fR (\fBoptions\fR)
.br

Expand Down Expand Up @@ -65,6 +75,11 @@ Command line arguments
Don't start FTL, show only version
.br

\fB-vv\fR
.br
Don't start FTL, show verbose version information of embedded applications
.br

\fB-t, tag\fR
.br
Don't start FTL, show only git tag
Expand All @@ -90,6 +105,31 @@ Command line arguments
Test resolver config file syntax
.br

\fBregex-test str\fR
.br
Test str against all regular expressions in the database
.br

\fBregex-test str rgx\fR
.br
Test str against regular expression given by rgx
.br

\fBlua\fR
.br
Start the embedded Lua interpreter
.br

\fBluac\fR
.br
Execute the embedded Lua compiler
.br

\fBdhcp-discover\fR
.br
Discover DHCP servers in the local network
.br

\fB--\fR (options)
.br
Pass options to internal dnsmasq resolver
Expand Down
Loading

0 comments on commit 60a7bc5

Please sign in to comment.