From 4e28b76161c543c28214a262ec0d15b28a3a074e 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 a99a37e7..e9bfbca5 100755 --- a/pihole +++ b/pihole @@ -154,7 +154,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