Adam Warner
77e5121d43
Split new function out into a separte utility script and add a test for it. Can be used in future to organise re/commonly-used code
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-30 23:05:28 +00:00
Adam Warner
1dd9d55d82
Replace value for BLOCKING_ENABLED (and QUERY_LOGGING, for consistency) and if value that we are trying to replace does not exist, add it to the end of the file.
...
Co-authored-by: MichaIng <micha@dietpi.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-30 15:53:03 +00:00
Lukas Schlötterer
ed6b85241b
use sed substitute instead of delete and append ( #4555 )
...
* use sed substitute instead of delete and append
doesn't move the line to the end of the file, instead keeps the order of the lines in setupVars.conf intact
Signed-off-by: Lukas Schlötterer <80917404+lschloetterer@users.noreply.github.com>
* Match start of line
as suggested in the review
Signed-off-by: Lukas Schlötterer <80917404+lschloetterer@users.noreply.github.com>
Co-authored-by: yubiuser <ckoenig@posteo.de>
Co-authored-by: yubiuser <ckoenig@posteo.de>
2022-01-12 09:23:13 +01:00
DL6ER
5823f5e254
Use ss instead of lsof ( #4518 )
...
* Use ss instead of lsof for pihole status checks
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Use ss FILTER instead of piping into bash
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Use ss in debug log generation
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Remove lsof from dependencies
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-01-05 16:41:46 +00:00
Christian König
3989cc19e9
Remove double text output
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 19:55:42 +01:00
Christian König
bcb59159ed
Analyse port also on ports other than 53
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 19:52:11 +01:00
Christian König
2b52f92647
Inlcude port also in cli output
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 19:36:32 +01:00
Christian König
f45248df80
Use FTL's new dns-port API endpoint
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 13:42:19 +01:00
Christian König
5729f64ddc
Fix missing fi
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-28 12:21:31 +01:00
yubiuser
4a2f4c1bce
Fix indention_2
...
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
2021-12-28 12:11:46 +01:00
yubiuser
5ef731fc57
Fix indention
...
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
2021-12-28 12:11:26 +01:00
Christian König
71ebd64f4e
mend
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-26 18:13:14 +01:00
Christian König
9f0e0dbd37
Fix analyse ports
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-26 18:10:36 +01:00
Christian König
ef30a85afb
Include port in status function
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-26 17:10:48 +01:00
yubiuser
ae39e338fe
Use exec to run gravity script ( #4449 )
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-12-04 10:50:21 +01:00
Subhaditya Nath
ba6d700e7e
Fix pihole -v
output if WebAdmin not installed ( #4370 )
...
* Fix https://github.com/pi-hole/pi-hole/issues/4279
Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
* Don't ignore exit code of version.sh
If it exits with a non-zero return code, that means some error occurred,
and so it shouldn't be ignored.
Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
* Implement changes suggested by @Michalng
Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
* Implement changes suggested by @PromoFaux
Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
* Always source /etc/pihole/setupVars.conf
https://github.com/pi-hole/pi-hole/pull/4370#issuecomment-978149567
Co-authored-by: Adam Warner <me@adamwarner.co.uk>
2021-12-02 20:46:11 +00:00
DL6ER
cbc99d45c6
Small style change to finished debug upload display
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-09-07 11:21:34 +02:00
DL6ER
be68a5339c
Apply same improvement to pihole tricorder feature
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-09-07 11:16:40 +02:00
DL6ER
115e3eeda9
Use --no-progress-meter instead of --silent so error reasons are printed
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-08-30 20:20:45 +02:00
DL6ER
21897d7fbd
Add warning if curl failed
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-08-30 15:55:42 +02:00
DL6ER
31c7c019cb
Fix piping to pihole tricorder
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-08-30 14:04:48 +02:00
Christian König
ffe45e8b76
On enabling/disabeling only reload-lists instead of reload
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-08-06 20:51:48 +02:00
Christian König
6be647a85f
Fix coloring of pihole -t
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-07-16 21:52:12 +02:00
Adam Warner
4ac4bc5c18
Merge branch 'development' into fix/gravity_no_locallist
2021-07-04 00:48:09 +01:00
Christian König
4fb5157719
Squashed commits
...
Add simple grep function to pihole -t
Signed-off-by: Christian König <ckoenig@posteo.de>
Add help info
Signed-off-by: Christian König <ckoenig@posteo.de>
Improve help info
Signed-off-by: Christian König <ckoenig@posteo.de>
Fix details
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-07-03 17:13:19 +02:00
DL6ER
aa88be335e
Acknowledge that IPV{4,6}_ADDRESS may not exist
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-04-16 11:44:54 +02:00
DL6ER
5df7ed2f32
Obtain FTL's PID from the PID file ( #4103 )
...
* Try to obtain FTL's PID from the PID file. If this fails, try to identify the main process using pgrep --oldest (instead of relying on pkill finding the right one by itself). This allows the script to work in even when FTL is running inside the memory checker valgrind.
* Rename FTL_PID -> FTL_PID_FILE
* Remove the pgrep fallback after discussions about that it should be more obvious to users if something strange happened to their PID file. Also, simplify the routine using a bashism in the end.
* Shorten if [[ regex ]]
* Use unset instead of emptying the PID variable
Signed-off-by: DL6ER <dl6er@dl6er.de>
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-04-14 09:33:10 -07:00
Christian König
e7d937c412
Be more specific what pihole -d -a does
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-11-15 20:31:47 +01:00
Adam Warner
bb1a6243d6
Merge pull request #3669 from pi-hole/release/v5.1.2
...
Release/v5.1.2 to development
2020-08-14 16:28:53 +01:00
Dan Schaper
548ad6375d
Merge pull request #3524 from pi-hole/fix/status_checking
...
Fix pihole status to not rely on a TCP port test
2020-07-28 07:24:34 -07:00
DL6ER
6ee6eea1fb
Use pkill instead of the somewhat fragile combination of kill + pidof. This solves some issues especially when there are many TCP workers floating around.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-07-21 21:13:40 +02:00
DL6ER
94cd7f59d4
Make verbose output the default.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-07-01 18:49:31 +02:00
DL6ER
6009e86947
Fix pihole status to not rely on a TCP port test. The current test can fail even when there is no error i case the max. number of TCP workers is reached.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-07-01 18:39:28 +02:00
Thomas L. Kjeldsen
852f6b95f5
Prevent "pihole disable $timeout" from messing up future state changes
...
Signed-off-by: Thomas L. Kjeldsen <tlk@closureconsulting.com>
2020-05-30 02:58:27 +02:00
Dan Schaper
c76435883b
Merge pull request #3360 from dnicolson/fix-github-capitalisation
...
Fix GitHub capitalisation
2020-05-13 16:56:36 -07:00
Dave Nicolson
ab753e88a2
Fix GitHub capitalisation
...
Signed-off-by: Dave Nicolson <david.nicolson@gmail.com>
2020-05-13 12:55:00 +02:00
Adam Warner
9e96ff37de
Fix merge conflicts
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-05-12 22:16:43 +01:00
yubiuser
d27a565d39
Apply suggestions from code review
...
Co-Authored-By: DL6ER <DL6ER@users.noreply.github.com>
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-04-05 11:46:41 +02:00
Christian König
de42669bb7
fix typo in pihole help
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-04-05 08:56:10 +02:00
Christian König
3095fd4dd6
add restart [options] to cli help
...
Signed-off-by: Christian König <ckoenig@posteo.de>
2020-04-05 08:49:35 +02:00
XhmikosR
7b8611ced0
Assorted typo fixes. ( #3126 )
...
* Assorted typo fixes.
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
2020-03-08 16:53:14 -07:00
DL6ER
f10a151469
Fix pihole -t sed instructions.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-12 21:05:02 +01:00
DL6ER
a809624356
Update blocked strings for pihole -t.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-01-23 19:19:44 +01:00
DL6ER
69a909fc4c
On modification of lists, we should send real-time signal 0 instead of SIGHUP. This also preserves the DNS cache of not-blocked domains.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-11 21:47:46 +00:00
chrunchyjesus
476975540a
make some shebangs comply to posix standard
2019-11-05 22:33:00 +01:00
John Crisp
4f21f67775
Update pihole
...
Fix spelling typos
2019-10-06 15:09:14 +01:00
Adam Warner
61a40c1b43
merge devel into 4.3.2 And Resolve merge conflicts
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2019-09-22 01:16:44 +01:00
Adam Warner
79b8dac0fa
Remove readonly attribute of the PI_HOLE_BIN_DIR declaration in pihole
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2019-08-30 22:06:14 +01:00
Dan Schaper
03c65dd0e9
Convert hardcoded /usr/local/bin to variable
...
Update pihole script with full path to 'pihole'
Variable for webpage.sh 'pihole' call.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2019-08-24 04:49:14 -07:00
DL6ER
aef7892de6
Add missing hyphens.
...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-22 13:57:01 +02:00