1
0
mirror of https://github.com/pi-hole/pi-hole.git synced 2025-09-20 17:11:17 +08:00
Commit Graph

311 Commits

Author SHA1 Message Date
5002ce8ba7 Source files relative to the repos root
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 14:10:01 +02:00
ca1bab3c1b Fix more shellcheck warnings
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 10:52:57 +02:00
2088601148 Add .shellcheckrc to configure shellcheck ignore SC1090-1 globally
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 18:46:47 +01:00
3a9b9c027e In ./pihole line 20:
source "${colfile}"
       ^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 23:
source "${utilsfile}"
       ^------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 27:
source "${apifile}"
       ^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 34:
    source "${versionsfile}"
           ^---------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 251:
  local timer="$(echo "${data}"| jq --raw-output '.timer' )"
        ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 255:
  local str="Pi-hole $(echo "${data}" | jq --raw-output '.blocking')${extra}"
        ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 378:
  local logging_enabled=$(getFTLConfigValue dns.queryLogging)
        ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 385:
  readonly LOGFILE=$(getFTLConfigValue files.log.dnsmasq)
           ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
821c953216 Remove 'reconfigure' option (#5887) 2025-02-28 21:14:18 +00:00
b64a54bba1 Print a more helpful message on pihole checkout in docker containers
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-02-22 11:53:16 +01:00
49cf5bb221 Remove 'reconfigure' option
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-06 21:57:05 +01:00
bd9cc7cbb7 Clean up unused WEBCALL code
Debug Log is no longer available via web interface

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 17:15:12 -03:00
3ac426b5d1 Update manpage
Signed-off-by: Christian König <github@yubiuser.dev>
2024-12-16 12:42:07 +01:00
afdf45031f Missed a couple of references in the previous PR
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-10-02 21:51:56 +01:00
6645136f6b Align the indentation for the case statement in the bottom part of pihole script
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-10-02 21:21:09 +01:00
84a659dfac Update pihole
Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2024-10-02 19:41:17 +01:00
be00f3e723 Rename reloaddns-lists to reloadlists per suggestion
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2024-10-02 19:39:34 +01:00
cc476a49fe remove the restartdns functionality and promote the reloaddns functions
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2024-09-24 14:15:15 +01:00
bcef4f0c97 pihole status should return (= exit) early on error instead of continuing the script
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-09-02 18:59:42 +02:00
e3fc5cc8f2 Make the help text of "pihole checkout [what] [branch]" more colorful (#5734) 2024-08-28 08:43:11 +02:00
e8582f7740 Add pihole -h and autocompletion entry
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 19:44:42 +02:00
9e9c985245 FTL checkout: Check for availability of branches before trying to download from the webserver. Also, fix check_download_exists() possibly killing the script on non-availability of requested branches
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 06:11:42 +02:00
a302d7b5d7 Make the help text of "pihole checkout [what] [branch]" more colorful
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-26 05:22:15 +02:00
8e4fc27168 Add pihole api [endpoint] callback suitable for local API requests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-08-24 10:06:48 +02:00
2c32d485bd Remove obsolet getFTLPIDFile()
We can get the path of the PID file via getFTLConfigValue files.pid

Signed-off-by: Christian König <github@yubiuser.dev>
2024-07-27 22:00:52 +02:00
897e23089c Implement pihole enable/disable using the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-07-16 10:56:37 +02:00
ccdbfd4130 Use natural langauge for list manipulations, like pihole allow example.com or pihole deny other.net. Also remove using pihole deny not bad.org
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 13:56:49 +02:00
fe8e63853c Use concatenate of arguments instead of using the array directly
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-22 20:49:44 +02:00
b835fa06a6 Further black -> deny renaming
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-22 20:48:07 +02:00
424e825bd9 Do not auto-sudo in the pihole command
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-22 20:42:22 +02:00
7e91b9ab47 Update help text
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-22 20:35:06 +02:00
bfc18f8329 Rewrite list functions to use the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 23:04:39 +02:00
8f24e8aa5f Modify pihole -t to use TOML config items
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-19 22:41:42 +02:00
c3c31a1a60 Print version details automatically if not on master
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 23:14:58 +01:00
fe4d934a40 Simplify pihole -v
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-12-09 23:13:04 +01:00
bc96d3b0a9 Tweak help text of pihole setpassword
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-11-05 21:18:46 +01:00
ab3b6dfa67 No need to >/dev/null because setFTLConfigValue already does this
adjust output of setFTLConfigValue to test for the exit code of `pihole-FTL --config`
2023-10-28 19:46:45 +01:00
6292e65b37 When setting a blank password, use webserver.api.password instead of webserver.api.pwhash (fixed in https://github.com/pi-hole/FTL/pull/1702)
This prevents the password from being blanked out on the command line when it has been set by an environment variable
2023-10-28 17:56:37 +01:00
2c7fa4a7b3 Avoid printing getFTLConfigValue return in statusFunc()
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-10-18 02:07:06 -03:00
ec83d6b793 No help for gone functions
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-14 14:06:47 +02:00
46ff257344 Remove Chronometer
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-12 13:44:51 +02:00
044e856e6b Disable checkout function for (official) docker containers
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-10-08 13:23:44 +01:00
8ef8a27583 Remove webpage.sh
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-08-04 20:04:45 +02:00
6edd6a4d55 if ${USER} variable is blank, then populate it with whoami
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-18 08:11:48 +01:00
ba3e290915 Fix shellcheck errors
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-06-04 21:21:48 +02:00
b5800ef718 Remove getFTLAPIPort() function and fix pihole status
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-05-27 11:53:00 +01:00
2784b267ec pihole command: read values from pihole-FTL instead of setupvars.conf
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-05-27 11:51:16 +01:00
3695610300 Allow running pihole -g without root (run as user pihole)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-27 11:51:16 +01:00
ca00ffa101 Only source versions file if the file exits
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-02-02 11:58:58 +01:00
b8eae60fcc Disable a few commands for Docker. Currently this is done by monkeypatching the the pihole file on Docker install, however if someone was to run pihole checkout, these patches are removed.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-12-11 11:39:11 +00:00
233453267e Using shift to allow passing multiple arguments
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-11-23 15:33:49 -03:00
f3c27f706f Pass only the correct argument
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-11-23 14:07:30 -03:00
3d01e4d0cf No detour - use pihole-FTL.conf to get the API port number
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-09-26 22:55:30 +02:00
89b88416b3 Fix 4898
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-09-06 17:09:52 +02:00