diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-19 09:17:36 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-19 09:17:50 +0200 |
commit | 83f9d4b8bac6b5d401dfea19d4f9d61b7e638a47 (patch) | |
tree | ffe94ecad5b88b515140163814661afa7e97fcc3 /op-mode-definitions | |
parent | 41807725cad3266bf426a9de411bb693b914395e (diff) | |
download | vyos-1x-83f9d4b8bac6b5d401dfea19d4f9d61b7e638a47.tar.gz vyos-1x-83f9d4b8bac6b5d401dfea19d4f9d61b7e638a47.zip |
dhcp: op-mode: xml: error out if DHCP service not configured
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/dhcp.xml.in | 2 |
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> |