From 5183e9cf053e098d8d6fcb9c2ab100a576f11301 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 19 Sep 2021 09:17:36 +0200 Subject: dhcp: op-mode: xml: error out if DHCP service not configured (cherry picked from commit 83f9d4b8bac6b5d401dfea19d4f9d61b7e638a47) --- op-mode-definitions/dhcp.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 9b21cb9af..4e7568ab6 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -130,7 +130,7 @@ Restart DHCP server process - sudo systemctl restart isc-dhcp-server.service + if cli-shell-api existsActive service dhcp-server; then sudo systemctl restart isc-dhcp-server.service; else echo "DHCP server not configured"; fi -- cgit v1.2.3