8775720668
flip logic that was accidentally reversed in #4653
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2022-04-14 17:37:14 +01:00
48f56d0385
I tried to do too many things in one function, vastly overcomplicating what should have been _this_ all along
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2022-04-13 22:48:39 +01:00
42d3368955
Merge pull request #4663 from pi-hole/no_root
...
Only use sudo power if needed
2022-04-10 12:34:05 +02:00
4d31d5ee11
Address review comments
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2022-04-04 22:02:26 +01:00
6121c162ff
Fix typo
...
Co-authored-by: Marius Hanl <66004280+Maran23@users.noreply.github.com >
2022-04-03 13:49:43 +02:00
7fa8cdd03e
Address:
...
- Review Comments
- Stickler Complaints
2022-04-02 12:46:07 +01:00
722a716de3
Add exit code to status function
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-03-30 22:40:14 +02:00
614d18cd3d
Debug need sudo
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-03-30 21:24:51 +02:00
54ce8c2622
Only use sudo power if needed
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-03-30 21:04:36 +02:00
42424b515b
Add getFTLAPIPort function
...
Add ftl_api_port function
Signed-off-by: Christian König <ckoenig@posteo.de >
Use getFTLAPIPort in pihole
Signed-off-by: Christian König <ckoenig@posteo.de >
Use default portfile as fallback
Signed-off-by: Christian König <ckoenig@posteo.de >
Fix stickler
Signed-off-by: Christian König <ckoenig@posteo.de >
Correct variables
Signed-off-by: Christian König <ckoenig@posteo.de >
Apply suggestions from code review
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com >
Add test getFTLAPIPort returing default port
Signed-off-by: Christian König <ckoenig@posteo.de >
Remove unused code from test_key_val_replacement_works
Signed-off-by: Christian König <ckoenig@posteo.de >
Add getFTLAPIPort_custom test
Signed-off-by: Christian König <ckoenig@posteo.de >
Fix output format
Signed-off-by: Christian König <ckoenig@posteo.de >
Add debugging
Signed-off-by: Christian König <ckoenig@posteo.de >
Remove debugging and fix function
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-02-27 18:16:53 +01:00
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
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
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
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
3989cc19e9
Remove double text output
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-28 19:55:42 +01:00
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
2b52f92647
Inlcude port also in cli output
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-28 19:36:32 +01:00
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
5729f64ddc
Fix missing fi
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-28 12:21:31 +01:00
4a2f4c1bce
Fix indention_2
...
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com >
2021-12-28 12:11:46 +01:00
5ef731fc57
Fix indention
...
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com >
2021-12-28 12:11:26 +01:00
71ebd64f4e
mend
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-26 18:13:14 +01:00
9f0e0dbd37
Fix analyse ports
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-26 18:10:36 +01:00
ef30a85afb
Include port in status function
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-12-26 17:10:48 +01:00
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
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
cbc99d45c6
Small style change to finished debug upload display
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-09-07 11:21:34 +02:00
be68a5339c
Apply same improvement to pihole tricorder feature
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-09-07 11:16:40 +02:00
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
21897d7fbd
Add warning if curl failed
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-08-30 15:55:42 +02:00
31c7c019cb
Fix piping to pihole tricorder
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2021-08-30 14:04:48 +02:00
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
6be647a85f
Fix coloring of pihole -t
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2021-07-16 21:52:12 +02:00
4ac4bc5c18
Merge branch 'development' into fix/gravity_no_locallist
2021-07-04 00:48:09 +01:00
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
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
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
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
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
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
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
94cd7f59d4
Make verbose output the default.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2020-07-01 18:49:31 +02:00
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
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
c76435883b
Merge pull request #3360 from dnicolson/fix-github-capitalisation
...
Fix GitHub capitalisation
2020-05-13 16:56:36 -07:00
ab753e88a2
Fix GitHub capitalisation
...
Signed-off-by: Dave Nicolson <david.nicolson@gmail.com >
2020-05-13 12:55:00 +02:00
9e96ff37de
Fix merge conflicts
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2020-05-12 22:16:43 +01:00
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
de42669bb7
fix typo in pihole help
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2020-04-05 08:56:10 +02:00
3095fd4dd6
add restart [options] to cli help
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2020-04-05 08:49:35 +02:00