Skip to content

Commit 41bdb74

Browse files
authored
Merge pull request #3941 from pi-hole/release/v5.2.2
Pi-hole Core v5.2.2
2 parents 0d8ece1 + a139af8 commit 41bdb74

File tree

7 files changed

+304
-37
lines changed

7 files changed

+304
-37
lines changed

advanced/Scripts/chronometer.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,14 @@ get_sys_stats() {
228228
mapfile -t ph_ver_raw < <(pihole -v -c 2> /dev/null | sed -n 's/^.* v/v/p')
229229
if [[ -n "${ph_ver_raw[0]}" ]]; then
230230
ph_core_ver="${ph_ver_raw[0]}"
231-
ph_lte_ver="${ph_ver_raw[1]}"
232-
ph_ftl_ver="${ph_ver_raw[2]}"
231+
if [[ ${#ph_ver_raw[@]} -eq 2 ]]; then
232+
# AdminLTE not installed
233+
ph_lte_ver="(not installed)"
234+
ph_ftl_ver="${ph_ver_raw[1]}"
235+
else
236+
ph_lte_ver="${ph_ver_raw[1]}"
237+
ph_ftl_ver="${ph_ver_raw[2]}"
238+
fi
233239
else
234240
ph_core_ver="-1"
235241
fi

advanced/Scripts/piholeDebug.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,17 @@ compare_local_version_to_git_version() {
334334
return 1
335335
fi
336336
else
337-
:
337+
# There is no git directory so check if the web interface was disabled
338+
local setup_vars_web_interface
339+
setup_vars_web_interface=$(< ${PIHOLE_SETUP_VARS_FILE} grep ^INSTALL_WEB_INTERFACE | cut -d '=' -f2)
340+
if [[ "${pihole_component}" == "Web" ]] && [[ "${setup_vars_web_interface}" == "false" ]]; then
341+
log_write "${INFO} ${pihole_component}: Disabled in setupVars.conf via INSTALL_WEB_INTERFACE=false"
342+
else
343+
# Return an error message
344+
log_write "${COL_RED}Directory ${git_dir} doesn't exist${COL_NC}"
345+
# and exit with a non zero code
346+
return 1
347+
fi
338348
fi
339349
}
340350

@@ -371,9 +381,9 @@ get_program_version() {
371381
echo_current_diagnostic "${program_name} version"
372382
# Evalutate the program we are checking, if it is any of the ones below, show the version
373383
case "${program_name}" in
374-
"lighttpd") program_version="$(${program_name} -v |& head -n1 | cut -d '/' -f2 | cut -d ' ' -f1)"
384+
"lighttpd") program_version="$(${program_name} -v 2> /dev/null | head -n1 | cut -d '/' -f2 | cut -d ' ' -f1)"
375385
;;
376-
"php") program_version="$(${program_name} -v |& head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)"
386+
"php") program_version="$(${program_name} -v 2> /dev/null | head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)"
377387
;;
378388
# If a match is not found, show an error
379389
*) echo "Unrecognized program";

advanced/Templates/gravity.db.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ CREATE TABLE domainlist_by_group
7373
CREATE TABLE client
7474
(
7575
id INTEGER PRIMARY KEY AUTOINCREMENT,
76-
ip TEXT NOL NULL UNIQUE,
76+
ip TEXT NOT NULL UNIQUE,
7777
date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
7878
date_modified INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int)),
7979
comment TEXT

automated install/basic-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2451,7 +2451,7 @@ get_binary_name() {
24512451
elif [[ "${machine}" == "x86_64" ]]; then
24522452
# This gives the processor of packages dpkg installs (for example, "i386")
24532453
local dpkgarch
2454-
dpkgarch=$(dpkg --print-processor 2> /dev/null || true)
2454+
dpkgarch=$(dpkg --print-processor 2> /dev/null || dpkg --print-architecture 2> /dev/null)
24552455

24562456
# Special case: This is a 32 bit OS, installed on a 64 bit machine
24572457
# -> change machine processor to download the 32 bit executable

gravity.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ database_table_from_file() {
176176
echo "${rowid},\"${domain}\",${timestamp}" >> "${tmpFile}"
177177
elif [[ "${table}" == "adlist" ]]; then
178178
# Adlist table format
179-
echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"
179+
echo "${rowid},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"," >> "${tmpFile}"
180180
else
181181
# White-, black-, and regexlist table format
182182
echo "${rowid},${type},\"${domain}\",1,${timestamp},${timestamp},\"Migrated from ${source}\"" >> "${tmpFile}"

manpages/pihole-FTL.8

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "Pihole-FTL" "8" "pihole-FTL" "Pi-hole" "June 2018"
1+
.TH "Pihole-FTL" "8" "pihole-FTL" "Pi-hole" "November 2020"
22
.SH "NAME"
33
pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
44
.br
@@ -10,7 +10,7 @@ pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
1010
.br
1111
\fBpihole-FTL test\fR
1212
.br
13-
\fBpihole-FTL -v\fR
13+
\fBpihole-FTL -v|-vv\fR
1414
.br
1515
\fBpihole-FTL -t\fR
1616
.br
@@ -22,6 +22,16 @@ pihole-FTL - Pi-hole : The Faster-Than-Light (FTL) Engine
2222
.br
2323
\fBpihole-FTL dnsmasq-test\fR
2424
.br
25+
\fBpihole-FTL regex-test str\fR
26+
.br
27+
\fBpihole-FTL regex-test str rgx\fR
28+
.br
29+
\fBpihole-FTL lua\fR
30+
.br
31+
\fBpihole-FTL luac\fR
32+
.br
33+
\fBpihole-FTL dhcp-discover\fR
34+
.br
2535
\fBpihole-FTL --\fR (\fBoptions\fR)
2636
.br
2737

@@ -65,6 +75,11 @@ Command line arguments
6575
Don't start FTL, show only version
6676
.br
6777

78+
\fB-vv\fR
79+
.br
80+
Don't start FTL, show verbose version information of embedded applications
81+
.br
82+
6883
\fB-t, tag\fR
6984
.br
7085
Don't start FTL, show only git tag
@@ -90,6 +105,31 @@ Command line arguments
90105
Test resolver config file syntax
91106
.br
92107

108+
\fBregex-test str\fR
109+
.br
110+
Test str against all regular expressions in the database
111+
.br
112+
113+
\fBregex-test str rgx\fR
114+
.br
115+
Test str against regular expression given by rgx
116+
.br
117+
118+
\fBlua\fR
119+
.br
120+
Start the embedded Lua interpreter
121+
.br
122+
123+
\fBluac\fR
124+
.br
125+
Execute the embedded Lua compiler
126+
.br
127+
128+
\fBdhcp-discover\fR
129+
.br
130+
Discover DHCP servers in the local network
131+
.br
132+
93133
\fB--\fR (options)
94134
.br
95135
Pass options to internal dnsmasq resolver

0 commit comments

Comments
 (0)