fix the systemd-resolved service check in Pi-hole's pre-install hook (#984)

Co-authored-by: Mark Sheppard <>
This commit is contained in:
Mark Sheppard 2024-03-26 19:45:05 +00:00 committed by GitHub
parent 09aa58a06d
commit 2c3fdd15b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ RESOLVED_SERVICE_NAME="systemd-resolved"
RESOLVED_CONF_FILE="/etc/systemd/resolved.conf"
# Check if the 'systemd-resolved' service is running
if ! systemctl is-active --quiet service "${RESOLVED_SERVICE_NAME}"; then
if ! systemctl is-active --quiet "${RESOLVED_SERVICE_NAME}.service"; then
echo "Service '${RESOLVED_SERVICE_NAME}' is not running"
exit
fi