diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-16 21:28:55 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-07-16 21:29:39 +0200 |
commit | c74ae852152b0c3c3f00a1847d081d28f500e178 (patch) | |
tree | 9317a44e31b6ed0688dfb546401ac237ff063b23 /op-mode-definitions/restart-router-advert.xml.in | |
parent | 887de85b7a78dde370ddb71ddcb3f87557536e08 (diff) | |
download | vyos-1x-c74ae852152b0c3c3f00a1847d081d28f500e178.tar.gz vyos-1x-c74ae852152b0c3c3f00a1847d081d28f500e178.zip |
op-mode: T6577: create generic service restart helper to work with the API
Right now we have multiple restart helpers (e.g. dhcp server, ssh, ntp) that
all do the same (more or less):
* Check if service is configured on CLI
* Restart if configured
* Error out if unconfigured
This is not available via the op-mode API. Create a new restart.py op-mode
helper that takes the service name and possible VRF as argument so it's also
exposed via API.
Diffstat (limited to 'op-mode-definitions/restart-router-advert.xml.in')
-rw-r--r-- | op-mode-definitions/restart-router-advert.xml.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/op-mode-definitions/restart-router-advert.xml.in b/op-mode-definitions/restart-router-advert.xml.in index 304b4dfd3..9eea3dfc4 100644 --- a/op-mode-definitions/restart-router-advert.xml.in +++ b/op-mode-definitions/restart-router-advert.xml.in @@ -6,7 +6,7 @@ <properties> <help>Restart IPv6 Router Advertisement service</help> </properties> - <command>if cli-shell-api existsActive service router-advert; then sudo systemctl restart radvd.service; else echo "IPv6 Router Advertisement service not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name router_advert</command> </node> </children> </node> |