Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1837b754b9 | ||
|
|
d0fd967734 | ||
|
|
4247a6056b | ||
|
|
dff04eb822 | ||
|
|
c5a2078ce7 | ||
|
|
1d6b3cd894 | ||
|
|
91727fe284 | ||
|
|
fc4c10dbe2 | ||
|
|
0e46b9c83f | ||
|
|
49099d017a | ||
|
|
72e3699265 | ||
|
|
1818e7e59e | ||
|
|
770aa1f061 | ||
|
|
66a3c73d6c | ||
|
|
1ca693866c | ||
|
|
77dd566a4f |
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -29,12 +29,12 @@ jobs:
|
|||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
-
|
-
|
||||||
name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/init@4e94bd11f71e507f7f87df81788dff88d1dacbfb #v4.31.0
|
||||||
with:
|
with:
|
||||||
languages: 'python'
|
languages: 'python'
|
||||||
-
|
-
|
||||||
name: Autobuild
|
name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/autobuild@4e94bd11f71e507f7f87df81788dff88d1dacbfb #v4.31.0
|
||||||
-
|
-
|
||||||
name: Perform CodeQL Analysis
|
name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb #v4.31.0
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
ignore_words_file: .codespellignore
|
ignore_words_file: .codespellignore
|
||||||
|
|
||||||
- name: Get editorconfig-checker
|
- name: Get editorconfig-checker
|
||||||
uses: editorconfig-checker/action-editorconfig-checker@5ecdd656fe347c26f76b1b435b90e1d74fb5e787 # tag v2. is really out of date
|
uses: editorconfig-checker/action-editorconfig-checker@4b6cd6190d435e7e084fb35e36a096e98506f7b9 #v2.1.0
|
||||||
|
|
||||||
- name: Run editorconfig-checker
|
- name: Run editorconfig-checker
|
||||||
run: editorconfig-checker
|
run: editorconfig-checker
|
||||||
|
|||||||
@@ -8,12 +8,20 @@ utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
|
|||||||
|
|
||||||
# Get file paths
|
# Get file paths
|
||||||
FTL_PID_FILE="$(getFTLConfigValue files.pid)"
|
FTL_PID_FILE="$(getFTLConfigValue files.pid)"
|
||||||
|
FTL_LOG_FILE="$(getFTLConfigValue files.log.ftl)"
|
||||||
|
PIHOLE_LOG_FILE="$(getFTLConfigValue files.log.dnsmasq)"
|
||||||
|
WEBSERVER_LOG_FILE="$(getFTLConfigValue files.log.webserver)"
|
||||||
|
FTL_PID_FILE="${FTL_PID_FILE:-/run/pihole-FTL.pid}"
|
||||||
|
FTL_LOG_FILE="${FTL_LOG_FILE:-/var/log/pihole/FTL.log}"
|
||||||
|
PIHOLE_LOG_FILE="${PIHOLE_LOG_FILE:-/var/log/pihole/pihole.log}"
|
||||||
|
WEBSERVER_LOG_FILE="${WEBSERVER_LOG_FILE:-/var/log/pihole/webserver.log}"
|
||||||
|
|
||||||
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
|
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
|
||||||
mkdir -p /var/log/pihole
|
mkdir -p /var/log/pihole
|
||||||
chown -R pihole:pihole /etc/pihole/ /var/log/pihole/
|
chown -R pihole:pihole /etc/pihole/ /var/log/pihole/
|
||||||
|
|
||||||
# allow all users read version file (and use pihole -v)
|
# allow all users read version file (and use pihole -v)
|
||||||
|
touch /etc/pihole/versions
|
||||||
chmod 0644 /etc/pihole/versions
|
chmod 0644 /etc/pihole/versions
|
||||||
|
|
||||||
# allow pihole to access subdirs in /etc/pihole (sets execution bit on dirs)
|
# allow pihole to access subdirs in /etc/pihole (sets execution bit on dirs)
|
||||||
@@ -28,7 +36,7 @@ chown root:root /etc/pihole/logrotate
|
|||||||
|
|
||||||
# Touch files to ensure they exist (create if non-existing, preserve if existing)
|
# Touch files to ensure they exist (create if non-existing, preserve if existing)
|
||||||
[ -f "${FTL_PID_FILE}" ] || install -D -m 644 -o pihole -g pihole /dev/null "${FTL_PID_FILE}"
|
[ -f "${FTL_PID_FILE}" ] || install -D -m 644 -o pihole -g pihole /dev/null "${FTL_PID_FILE}"
|
||||||
[ -f /var/log/pihole/FTL.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/FTL.log
|
[ -f "${FTL_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${FTL_LOG_FILE}"
|
||||||
[ -f /var/log/pihole/pihole.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/pihole.log
|
[ -f "${PIHOLE_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${PIHOLE_LOG_FILE}"
|
||||||
[ -f /var/log/pihole/webserver.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/webserver.log
|
[ -f "${WEBSERVER_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${WEBSERVER_LOG_FILE}"
|
||||||
[ -f /etc/pihole/dhcp.leases ] || install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases
|
[ -f /etc/pihole/dhcp.leases ] || install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ c=70
|
|||||||
PIHOLE_META_PACKAGE_CONTROL_APT=$(
|
PIHOLE_META_PACKAGE_CONTROL_APT=$(
|
||||||
cat <<EOM
|
cat <<EOM
|
||||||
Package: pihole-meta
|
Package: pihole-meta
|
||||||
Version: 0.5
|
Version: 0.6
|
||||||
Maintainer: Pi-hole team <adblock@pi-hole.net>
|
Maintainer: Pi-hole team <adblock@pi-hole.net>
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Description: Pi-hole dependency meta package
|
Description: Pi-hole dependency meta package
|
||||||
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,procps,psmisc,sudo,unzip
|
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,bind9-dnsutils|dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,procps,psmisc,sudo,unzip
|
||||||
Section: contrib/metapackages
|
Section: contrib/metapackages
|
||||||
Priority: optional
|
Priority: optional
|
||||||
EOM
|
EOM
|
||||||
@@ -694,10 +694,11 @@ chooseInterface() {
|
|||||||
status="OFF"
|
status="OFF"
|
||||||
done
|
done
|
||||||
# Disable check for double quote here as we are passing a string with spaces
|
# Disable check for double quote here as we are passing a string with spaces
|
||||||
|
# shellcheck disable=SC2086
|
||||||
PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \
|
PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \
|
||||||
--cancel-label "Exit" --ok-label "Select" \
|
--cancel-label "Exit" --ok-label "Select" \
|
||||||
--radiolist "Choose An Interface (press space to toggle selection)" \
|
--radiolist "Choose An Interface (press space to toggle selection)" \
|
||||||
${r} ${c} "${interfaceCount}" "${interfacesList}")
|
${r} ${c} "${interfaceCount}" ${interfacesList})
|
||||||
|
|
||||||
result=$?
|
result=$?
|
||||||
case ${result} in
|
case ${result} in
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ pyyaml == 6.0.3
|
|||||||
pytest == 8.4.2
|
pytest == 8.4.2
|
||||||
pytest-xdist == 3.8.0
|
pytest-xdist == 3.8.0
|
||||||
pytest-testinfra == 10.2.2
|
pytest-testinfra == 10.2.2
|
||||||
tox == 4.31.0
|
tox == 4.32.0
|
||||||
pytest-clarity == 1.0.1
|
pytest-clarity == 1.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user