Compare commits

..

10 Commits

Author SHA1 Message Date
Christian König 95021fce58 Fix permission for *.etag files after gravity run
CodeQL / Analyze (pull_request) Has been cancelled
Test Supported Distributions / smoke-tests (pull_request) Has been cancelled
Test Supported Distributions / distro-test (centos_10) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (centos_9) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (debian_11) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (debian_12) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (fedora_40) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (fedora_41) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (fedora_42) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (ubuntu_20) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (ubuntu_22) (pull_request) Has been cancelled
Test Supported Distributions / distro-test (ubuntu_24) (pull_request) Has been cancelled
Signed-off-by: Christian König <github@yubiuser.dev>
2025-07-16 21:00:05 +02:00
Dan Schaper ae048201a2 Remove readonly from list.sh to avoid errors (#6349) 2025-07-14 21:10:53 -07:00
RD WebDesign dad27f8d06 Remove readonly from list.sh to avoid errors
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-07-14 21:20:39 -03:00
Dan Schaper c0b512be60 Sync master back into development (#6348) 2025-07-14 14:45:31 -07:00
Adam Warner cef7fd4b02 Pi-hole core 6.1.4 (#6347) 2025-07-14 22:15:50 +01:00
Adam Warner c09da77e2b Fix pihole api command by not setting the some variabes as readonly (#6346) 2025-07-14 22:09:27 +01:00
Adam Warner 18e8396a44 Fix issue where web interface cannot run gravity (#6345) 2025-07-14 22:05:18 +01:00
Adam Warner 1bef0415db bare minimum first past fix for pihoe api command not working due to attempting to re-set readony variabes PI_HOE_SCRIPT_DIR and utisfie.
Can't compain about them being readony if they're.. not.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-07-14 22:02:02 +01:00
Adam Warner d6a83baf4f Allow non-root access for updateGravity command
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-07-14 21:38:59 +01:00
Dan Schaper 605ff8183a Sync master back into development (#6341) 2025-07-14 11:45:03 -07:00
3 changed files with 10 additions and 6 deletions
+3 -3
View File
@@ -9,12 +9,12 @@
# This file is copyright under the latest version of the EUPL. # This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license. # Please see LICENSE file for your rights under this license.
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole" PI_HOLE_SCRIPT_DIR="/opt/pihole"
readonly utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
# shellcheck source="./advanced/Scripts/utils.sh" # shellcheck source="./advanced/Scripts/utils.sh"
source "${utilsfile}" source "${utilsfile}"
readonly apifile="${PI_HOLE_SCRIPT_DIR}/api.sh" apifile="${PI_HOLE_SCRIPT_DIR}/api.sh"
# shellcheck source="./advanced/Scripts/api.sh" # shellcheck source="./advanced/Scripts/api.sh"
source "${apifile}" source "${apifile}"
+4
View File
@@ -808,6 +808,10 @@ gravity_DownloadBlocklistFromUrl() {
fix_owner_permissions "${saveLocation}" fix_owner_permissions "${saveLocation}"
# Compare lists if they are identical # Compare lists if they are identical
compareLists "${adlistID}" "${saveLocation}" compareLists "${adlistID}" "${saveLocation}"
# Set permissions for the *.etag file
if [[ -f "${saveLocation}.etag" ]]; then
fix_owner_permissions "${saveLocation}.etag"
fi
# Add domains to database table file # Add domains to database table file
pihole-FTL "${gravity_type}" parseList "${saveLocation}" "${gravityTEMPfile}" "${adlistID}" pihole-FTL "${gravity_type}" parseList "${saveLocation}" "${gravityTEMPfile}" "${adlistID}"
done="true" done="true"
+3 -3
View File
@@ -9,7 +9,7 @@
# This file is copyright under the latest version of the EUPL. # This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license. # Please see LICENSE file for your rights under this license.
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole" PI_HOLE_SCRIPT_DIR="/opt/pihole"
# PI_HOLE_BIN_DIR is not readonly here because in some functions (checkout), # PI_HOLE_BIN_DIR is not readonly here because in some functions (checkout),
# they might get set again when the installer is sourced. This causes an # they might get set again when the installer is sourced. This causes an
@@ -20,7 +20,7 @@ readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
# shellcheck source=./advanced/Scripts/COL_TABLE # shellcheck source=./advanced/Scripts/COL_TABLE
source "${colfile}" source "${colfile}"
readonly utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh" utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
# shellcheck source=./advanced/Scripts/utils.sh # shellcheck source=./advanced/Scripts/utils.sh
source "${utilsfile}" source "${utilsfile}"
@@ -552,7 +552,7 @@ case "${1}" in
"enable" ) need_root=0;; "enable" ) need_root=0;;
"disable" ) need_root=0;; "disable" ) need_root=0;;
"-d" | "debug" ) ;; "-d" | "debug" ) ;;
"-g" | "updateGravity" ) ;; "-g" | "updateGravity" ) need_root=0;;
"reloaddns" ) ;; "reloaddns" ) ;;
"reloadlists" ) ;; "reloadlists" ) ;;
"setpassword" ) ;; "setpassword" ) ;;