6744 Commits

Author SHA1 Message Date
yubiuser
744ac6ad88
Add Fedora 42 to tests (#6177) 2025-05-04 13:28:03 +02:00
darkexplosiveqwx
b82487ee6a
Add Fedora 42 to tests
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2025-05-04 12:02:15 +02:00
Dan Schaper
0a72e517b6
Remove reference to telnet and chronometer in README (#6188) 2025-05-03 13:38:29 -07:00
Dan Schaper
09368a77b4
Remove unused $target from gravity (#6192) 2025-05-03 13:37:45 -07:00
Dan Schaper
0e6439c6c0
Remove check for supported OS (#6206) 2025-05-03 13:17:56 -07:00
Christian König
5355e9e084
Remove os_check from debug script
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-28 21:10:36 +02:00
Christian König
54c8dd3d77
Remove os_check from tests
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-28 21:06:05 +02:00
Christian König
d9f4ee7aaa
Remove os_check from update script
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-28 21:04:08 +02:00
Christian König
40da3a40ec
Remove os_check from install script
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-28 21:03:08 +02:00
yubiuser
3cbaee7b76
Fix gravity waiting forever for DNS (#6196) 2025-04-26 16:48:24 +02:00
yubiuser
3bd6a41795
Improve wording
Co-authored-by: Adam Warner <me@adamwarner.co.uk>
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-04-26 15:36:22 +02:00
Christian König
4303a5868f
Only append dot
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:42 +02:00
Christian König
215003899d
(2+1)*40
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-26 15:03:01 +02:00
yubiuser
cf3b7d0d8e
Bump actions/setup-python from 5.5.0 to 5.6.0 (#6199) 2025-04-26 12:56:31 +02:00
dependabot[bot]
454f96d0ea
Bump actions/setup-python from 5.5.0 to 5.6.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.5.0 to 5.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.5.0...v5.6.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-26 10:25:43 +00:00
Christian König
72a52807d1
Fix gravity waiting forever for DNS
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-25 21:03:09 +02:00
Christian König
d7b6d6aa33
Remove unused $target from gravity
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-22 23:06:01 +02:00
Rob Gill
ce0bdac1bd
Remove reference to telnet and chronometer in README
Replace with curl example and commandline example

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-04-23 06:41:16 +10:00
yubiuser
60485fdc51
Remove duplicated code checking if adlist domain is blocked locally (#6183) 2025-04-21 09:17:39 +02:00
yubiuser
6fe77ebeed
Treat FTL return data as strings - part II (#6184) 2025-04-21 09:16:58 +02:00
Christian König
8733b429dd
Treat FTL return data as strings - part II
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-20 22:50:55 +02:00
Christian König
1432568d17
Remove duplicated code checking if adlist domain is blocked locally
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-20 20:14:41 +02:00
yubiuser
248d25b8d0
Install on IPv6-only/DNS64/NAT64 system (#6144) 2025-04-15 17:33:09 +02:00
Dominik
95c1b1a542
Add ON DELETE CASCADE to FOREIGN KEY REFERENCES in gravity.db (#6113) 2025-04-15 06:24:52 +02:00
Rob Gill
9e62625f83
Install on IPv6-only/DNS64/NAT64 system
Alters the test for IPv4 route so the installer doesn't fail instantly on IPv6-only.

Gives user a dialog to proceed with IPv6 only installation

Switches DNS server options to only contain IPv6 addresses.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-04-15 14:13:43 +10:00
Dan Schaper
faeba69090
revert a change to gravity.sh that attempted to fix an SC2086 warning… (#6162) 2025-04-09 10:07:10 -07:00
Adam Warner
48272f3393
revert a change to gravity.sh that attempted to fix an SC2086 warning from shellcheck.
Fixes #6159

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-09 18:02:40 +01:00
Adam Warner
195e65855d
Fix more shellcheck warnings (#6155) 2025-04-08 17:27:07 +01:00
Christian König
0f511ad574
Remove token and use sarif-fmt for nicer CLI output
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-08 17:50:19 +02:00
Adam Warner
323dbbe5d9
Reduce code duplication in piholeLogFlush (#6148) 2025-04-08 12:44:30 +01:00
Christian König
bda81cb2f5
Remove debug SARIF upload
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 21:25:29 +02:00
Christian König
b271dbf606
Set shellcheck level to warning, can be lowered later
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 14:11:39 +02:00
Christian König
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
Christian König
135b0cce14
Switch to Differential ShellCheck
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 11:54:35 +02:00
Christian König
23fc53c618
Set -x option for shellcheck GHA
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 11:32:14 +02:00
Adam Warner
3732ea7365
Remove shellcheck directives that no longer serve any purpose
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-07 10:24:53 +01:00
Christian König
ca1bab3c1b
Fix more shellcheck warnings
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-07 10:52:57 +02:00
yubiuser
36e6c9921e
Shellcheck Tweaks (#6147) 2025-04-07 10:08:25 +02:00
Dan Schaper
6c5bc1de39
versions file should readable by others (make pihole -v work for non-root users) (#6002) 2025-04-06 12:58:16 -07:00
Christian König
9f5e18b1cd
Make it 644
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-06 21:13:47 +02:00
Christian König
d28e795266
Permissions on versions file should be 640
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-06 21:12:58 +02:00
Christian König
e579397f51
Allow all users to read the version file
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-06 20:52:57 +02:00
Adam Warner
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
Adam Warner
48c59cb6cf
In ./automated install/uninstall.sh line 14:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./advanced/Scripts/update.sh line 39:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./advanced/Scripts/updatecheck.sh line 45:
readonly ADMIN_INTERFACE_DIR=$(getFTLConfigValue "webserver.paths.webroot")$(getFTLConfigValue "webserver.paths.webhome")
         ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:20:51 +01:00
Adam Warner
f01e8c70d9
Weirldly, GHA missed these minor warnings however have disabled them as they are due to variables either being used in or declared in basic-install,.sh
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
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
Adam Warner
f5dc337d1b
In ./advanced/Scripts/piholeLogFlush.sh line 12:
source ${colfile}
       ^--------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

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

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
63623c4353
In ./advanced/Scripts/piholeCheckout.sh line 112:
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
                      ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 139:
        webbranches=($(get_available_branches "${webInterfaceDir}"))
                     ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 170:
        ftlbranches=( $(git ls-remote https://github.com/pi-hole/ftl | grep "refs/heads" | cut -d'/' -f3- -) )
                      ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 218:
            elif [ $? -eq 2 ]; then
                   ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
59d2177271
In ./advanced/Scripts/database_migration/gravity-db.sh line 18:
piholeDir="${2}"
    ^-------^ SC2034 (warning): piholeDir appears unused. Verify use (or export if used externally).

Turns out it is _actually_ unused, the full path of the gravity database is passed to the function, so we'll tidy this up rather than supressing.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
a624d3be8d
In ./advanced/Scripts/utils.sh line 91:
if [[ $? -eq 5 ]]; then
     ^------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00