summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/dhcp.xml.in2
1 files changed, 1 insertions, 1 deletions
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 @@
<properties>
<help>Restart DHCP server process</help>
</properties>
- <command>sudo systemctl restart isc-dhcp-server.service</command>
+ <command>if cli-shell-api existsActive service dhcp-server; then sudo systemctl restart isc-dhcp-server.service; else echo "DHCP server not configured"; fi</command>
</node>
<node name="relay-agent">
<properties>