summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-29 22:47:22 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-30 11:48:12 +0000
commit16235b2037af1941b4bb808fde1399692a4eab12 (patch)
tree4e13248b1579652515ed47e1f44744ee967aef07
parentc5fb6aecdc1fc3ca492b1641404ede1eba7a5e74 (diff)
downloadvyos-1x-16235b2037af1941b4bb808fde1399692a4eab12.tar.gz
vyos-1x-16235b2037af1941b4bb808fde1399692a4eab12.zip
op-mode: T5231: add command to restart reverse-proxy
(cherry picked from commit 2980eb0ad527f0ef0f1527c0ea97842ca2a8ede5)
-rw-r--r--op-mode-definitions/reverse-proxy.xml.in23
-rw-r--r--op-mode-definitions/show-reverse-proxy.xml.in13
2 files changed, 23 insertions, 13 deletions
diff --git a/op-mode-definitions/reverse-proxy.xml.in b/op-mode-definitions/reverse-proxy.xml.in
new file mode 100644
index 000000000..4af24880b
--- /dev/null
+++ b/op-mode-definitions/reverse-proxy.xml.in
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="reverse-proxy">
+ <properties>
+ <help>Restart reverse-proxy service</help>
+ </properties>
+ <command>if cli-shell-api existsActive load-balancing reverse-proxy; then sudo systemctl restart haproxy.service; else echo "Reverse-Proxy not configured"; fi</command>
+ </node>
+ </children>
+ </node>
+ <node name="show">
+ <children>
+ <node name="reverse-proxy">
+ <properties>
+ <help>Show load-balancing reverse-proxy</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reverseproxy.py show</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-reverse-proxy.xml.in b/op-mode-definitions/show-reverse-proxy.xml.in
deleted file mode 100644
index ed0fee843..000000000
--- a/op-mode-definitions/show-reverse-proxy.xml.in
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<interfaceDefinition>
- <node name="show">
- <children>
- <node name="reverse-proxy">
- <properties>
- <help>Show load-balancing reverse-proxy</help>
- </properties>
- <command>sudo ${vyos_op_scripts_dir}/reverseproxy.py show</command>
- </node>
- </children>
- </node>
-</interfaceDefinition>