From 097e758cb602e897e2e497099e75c187c26d3d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 29 Nov 2022 22:47:53 +0100 Subject: [PATCH] Allow pihole restart via systemctl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- pihole | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pihole b/pihole index ca80bff8..434f6927 100755 --- a/pihole +++ b/pihole @@ -139,7 +139,12 @@ restartDNS() { fi else # A full restart has been requested - svc="service pihole-FTL restart" + if command -v systemctl >/dev/null 2>&1 ; then + svc="systemctl restart pihole-FTL" + else + svc="service pihole-FTL restart" + fi + str="Restarting DNS server" icon="${TICK}" fi