2097 Commits

Author SHA1 Message Date
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
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
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
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
Adam Warner
bdcb6fc88c
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.to… (#5981) 2025-04-05 01:18:49 +01:00
Adam Warner
f403468450
Add webserver log to piholeLogFlush.sh (#6049) 2025-04-05 00:33:18 +01:00
Adam Warner
4108c817dc
Revert "source with source not dot (#6137)"
This reverts commit 8fd2ebd3d7bc00fe4c36dcdae0932d7bab4a3c3c, reversing
changes made to 557bc6f1794244f55b36258a51e3bd494860b439.
2025-04-04 19:12:57 +01:00
Michael Woolweaver
4efe4dfd4b
source with source not dot
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-02 14:21:45 -05:00
James George
0f482396ee
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.toml settings for webserver.paths.webroot and webserver.paths.webhome
When uninstalling, remove web interface parent directory empty check and possible removal.

Signed-off-by: James George <james.george@vigilantvoid.com>
2025-03-30 13:11:21 +08:00
yubiuser
3f5c00919b
Remove WEB_CALL from COL_TABLE (#6062) 2025-03-10 06:14:47 +01:00
yubiuser
349544b24a
Create webserver.log on FTL startup (#6051) 2025-03-10 06:14:22 +01:00
yubiuser
80d63eca93
Add 2FA handling to api.sh (#6065) 2025-03-08 10:46:54 +01:00
casperklein
9b4502a7a9
Add trailing / to directories
Signed-off-by: casperklein <casperklein@users.noreply.github.com>
2025-03-07 23:00:40 +01:00
Christian König
5de9b6ae69
Add 2FA handling to api.sh
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-07 13:43:41 +01:00
Christian König
f3dc202e36
Remove WEB_CALL from COL_TABLE
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-07 10:16:25 +01:00
XhmikosR
45cb722e50
version.sh: fix typo in comment
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-03-06 21:40:17 +02:00
Christian König
e437e3a805
Create webserver.log on FTL startup
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-06 09:48:06 +01:00
Jack'lul
4df5c0bb96
Add webserver log to piholeLogFlush.sh
Signed-off-by: Jack'lul <8418678+jacklul@users.noreply.github.com>
2025-03-05 22:25:33 +01:00
Jack'lul
0130f7be74
Fix find command syntax, remove log dir from search
Signed-off-by: Jack'lul <8418678+jacklul@users.noreply.github.com>
2025-03-01 14:43:36 +01:00
Adam Warner
821c953216
Remove 'reconfigure' option (#5887) 2025-02-28 21:14:18 +00:00
MichaIng
ad6a48b219
Add comment about TLS-related file permissions
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 20:59:32 +01:00
MichaIng
83a38bb71d
Add comment about file permissions
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 12:26:50 +01:00
MichaIng
232d581916
Re-add comment about execute bit on directory
Co-authored-by: Dominik <DL6ER@users.noreply.github.com>
Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-26 12:25:51 +01:00
MichaIng
0b380d671d
Follow symlinks with find
Incorporating https://github.com/pi-hole/pi-hole/pull/5997

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-24 17:37:01 +01:00
MichaIng
e70981d80f
Do not overwrite TLS cert/key mode
FTL correctly creates the cert and especially private key with 0600 mode. But the prestart scripts changes it to 0660.

After removing the dedicated webserver from Pi-hole setups, the pihole group has no purpose anymore, and files should not be writable to any other user than pihole itself, and the private TLS key not reasable to anyone else either.

Additionally, this commit consolidates the chmod calls, applying 0755 to all directories and 0640 to all files, but the TLS key and cert.

Signed-off-by: MichaIng <micha@dietpi.com>
2025-02-24 17:29:58 +01:00
Christian König
b59ab5852a
Add missing trailing / when setting permissions of /etc/pihole
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-24 15:59:11 +01:00
Christian König
cadee26dba
Improve dig error handlin in api.sh
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-22 13:48:55 +01:00
Christian König
c9e58adc48
DHCP discover timeout was reduced by FTL
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-10 20:41:18 +01:00
Christian König
d1639740d9
Fix database integrity check in debug log
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-10 20:29:05 +01:00
Christian König
49cf5bb221
Remove 'reconfigure' option
Signed-off-by: Christian König <github@yubiuser.dev>
2025-02-06 21:57:05 +01:00
Adam Warner
2ae78e02bd
Add call to os_check in the update script (#5845) 2025-02-04 17:35:15 +00:00
DL6ER
6d4d35e848
Merge branch 'development' into tweak/gravity_backup 2025-01-26 19:53:06 +01:00
RD WebDesign
254b67bca3
Using more user-friendly messages on git describe failure
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-13 20:11:41 -03:00
RD WebDesign
0ae50eab87
Suppress error message on git describe failure
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-12 20:25:32 -03:00
RD WebDesign
27fb2bbe3a
Replace some hardcoded paths with pihole.toml values
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:22 -03:00
RD WebDesign
c78be8a89d
No systemctl or service inside containers
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:22 -03:00
RD WebDesign
0590bbba2d
Skip some checks in docker container
These commands always fail in containers with "command not found" (as expected).

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:21 -03:00
RD WebDesign
733dce1c4c
If it's a docker container, consider the OS is supported
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-09 19:11:15 -03:00
RD WebDesign
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
DL6ER
fab1ca3a40
Merge branch 'development' into tweak/gravity_backup 2025-01-01 18:46:33 +01:00