Compare commits
1 Commits
v6.1.2
..
1a3a23a867
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a3a23a867 |
@@ -19,19 +19,13 @@
|
||||
|
||||
TestAPIAvailability() {
|
||||
|
||||
local chaos_api_list authResponse authStatus authData apiAvailable DNSport
|
||||
|
||||
# as we are running locally, we can get the port value from FTL directly
|
||||
readonly utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
|
||||
# shellcheck source=./advanced/Scripts/utils.sh
|
||||
. "${utilsfile}"
|
||||
|
||||
DNSport=$(getFTLConfigValue dns.port)
|
||||
local chaos_api_list authResponse authStatus authData apiAvailable
|
||||
|
||||
# Query the API URLs from FTL using CHAOS TXT local.api.ftl
|
||||
# The result is a space-separated enumeration of full URLs
|
||||
# e.g., "http://localhost:80/api/" "https://localhost:443/api/"
|
||||
chaos_api_list="$(dig +short -p "${DNSport}" chaos txt local.api.ftl @127.0.0.1)"
|
||||
chaos_api_list="$(dig +short chaos txt local.api.ftl @127.0.0.1)"
|
||||
|
||||
# If the query was not successful, the variable is empty
|
||||
if [ -z "${chaos_api_list}" ]; then
|
||||
|
||||
@@ -57,9 +57,9 @@ start() {
|
||||
stop() {
|
||||
if is_running; then
|
||||
kill "${FTL_PID}"
|
||||
# Give FTL 60 seconds to gracefully stop
|
||||
# Give FTL 120 seconds to gracefully stop
|
||||
i=1
|
||||
while [ "${i}" -le 60 ]; do
|
||||
while [ "${i}" -le 120 ]; do
|
||||
if ! is_running; then
|
||||
break
|
||||
fi
|
||||
|
||||
@@ -28,7 +28,7 @@ ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStopPost=/opt/pihole/pihole-FTL-poststop.sh
|
||||
|
||||
# Use graceful shutdown with a reasonable timeout
|
||||
TimeoutStopSec=60s
|
||||
TimeoutStopSec=120s
|
||||
|
||||
# Make /usr, /boot, /etc and possibly some more folders read-only...
|
||||
ProtectSystem=full
|
||||
|
||||
@@ -116,11 +116,11 @@ c=70
|
||||
PIHOLE_META_PACKAGE_CONTROL_APT=$(
|
||||
cat <<EOM
|
||||
Package: pihole-meta
|
||||
Version: 0.4
|
||||
Version: 0.3
|
||||
Maintainer: Pi-hole team <adblock@pi-hole.net>
|
||||
Architecture: all
|
||||
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,netcat-openbsd,procps,psmisc,sudo,unzip
|
||||
Depends: grep,dnsutils,binutils,git,iproute2,dialog,ca-certificates,cron | cron-daemon,curl,iputils-ping,psmisc,sudo,unzip,libcap2-bin,dns-root-data,libcap2,netcat-openbsd,procps,jq,lshw,bash-completion
|
||||
Section: contrib/metapackages
|
||||
Priority: optional
|
||||
EOM
|
||||
@@ -130,12 +130,12 @@ EOM
|
||||
PIHOLE_META_PACKAGE_CONTROL_RPM=$(
|
||||
cat <<EOM
|
||||
Name: pihole-meta
|
||||
Version: 0.2
|
||||
Version: 0.1
|
||||
Release: 1
|
||||
License: EUPL
|
||||
BuildArch: noarch
|
||||
Summary: Pi-hole dependency meta package
|
||||
Requires: bash-completion,bind-utils,binutils,ca-certificates,chkconfig,cronie,curl,dialog,findutils,gawk,git,grep,iproute,jq,libcap,lshw,nmap-ncat,procps-ng,psmisc,sudo,unzip
|
||||
Requires: grep,curl,psmisc,sudo, unzip,jq,git,dialog,ca-certificates, bind-utils, iproute, procps-ng, chkconfig, binutils, cronie, findutils, libcap, nmap-ncat, lshw, bash-completion
|
||||
%description
|
||||
Pi-hole dependency meta package
|
||||
%prep
|
||||
@@ -143,9 +143,6 @@ Pi-hole dependency meta package
|
||||
%files
|
||||
%install
|
||||
%changelog
|
||||
* Wed May 28 2025 Pi-hole Team - 0.2
|
||||
- Add gawk to the list of dependencies
|
||||
|
||||
* Sun Sep 29 2024 Pi-hole Team - 0.1
|
||||
- First version being packaged
|
||||
EOM
|
||||
@@ -1155,7 +1152,8 @@ installConfigs() {
|
||||
fi
|
||||
|
||||
# Install pihole-FTL systemd or init.d service, based on whether systemd is the init system or not
|
||||
if ps -p 1 -o comm= | grep -q systemd; then
|
||||
# Follow debhelper logic, which checks for /run/systemd/system to derive whether systemd is the init system
|
||||
if [[ -d '/run/systemd/system' ]]; then
|
||||
install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.systemd" '/etc/systemd/system/pihole-FTL.service'
|
||||
|
||||
# Remove init.d service if present
|
||||
|
||||
@@ -389,8 +389,8 @@ tailFunc() {
|
||||
echo -e " ${INFO} Press Ctrl-C to exit"
|
||||
|
||||
# Get logfile path
|
||||
LOGFILE=$(getFTLConfigValue files.log.dnsmasq)
|
||||
readonly LOGFILE
|
||||
LOGFILE=$(getFTLConfigValue files.log.dnsmasq)
|
||||
|
||||
# Strip date from each line
|
||||
# Color blocklist/denylist/wildcard entries as red
|
||||
|
||||
Reference in New Issue
Block a user