diff options
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/dhcp.xml.in | 4 | ||||
-rw-r--r-- | op-mode-definitions/dns-dynamic.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/dns-forwarding.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/firewall.xml.in | 12 | ||||
-rw-r--r-- | op-mode-definitions/igmp-proxy.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/mdns-reflector.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/monitor-bandwidth.xml.in | 3 | ||||
-rw-r--r-- | op-mode-definitions/restart-ntp.xml.in | 13 | ||||
-rw-r--r-- | op-mode-definitions/restart-router-advert.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/restart-snmp.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/restart-ssh.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/reverse-proxy.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/suricata.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/vpn-ipsec.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/vrrp.xml.in | 2 | ||||
-rw-r--r-- | op-mode-definitions/webproxy.xml.in | 2 |
16 files changed, 35 insertions, 21 deletions
diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index eee6937d6..b3438ab80 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -245,7 +245,7 @@ <properties> <help>Restart DHCP server</help> </properties> - <command>if cli-shell-api existsActive service dhcp-server; then sudo systemctl restart kea-dhcp4-server.service; else echo "DHCP server not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dhcp</command> </node> <node name="relay-agent"> <properties> @@ -264,7 +264,7 @@ <properties> <help>Restart DHCPv6 server</help> </properties> - <command>if cli-shell-api existsActive service dhcpv6-server; then sudo systemctl restart kea-dhcp6-server.service; else echo "DHCPv6 server not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dhcpv6</command> </node> <node name="relay-agent"> <properties> diff --git a/op-mode-definitions/dns-dynamic.xml.in b/op-mode-definitions/dns-dynamic.xml.in index 45d58e2e8..ef0f03988 100644 --- a/op-mode-definitions/dns-dynamic.xml.in +++ b/op-mode-definitions/dns-dynamic.xml.in @@ -97,7 +97,7 @@ <properties> <help>Restart Dynamic DNS service</help> </properties> - <command>if cli-shell-api existsActive service dns dynamic; then sudo systemctl restart ddclient.service; else echo "Dynamic DNS not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dns_dynamic</command> </node> </children> </node> diff --git a/op-mode-definitions/dns-forwarding.xml.in b/op-mode-definitions/dns-forwarding.xml.in index 29bfc61cf..fac3fc345 100644 --- a/op-mode-definitions/dns-forwarding.xml.in +++ b/op-mode-definitions/dns-forwarding.xml.in @@ -73,7 +73,7 @@ <properties> <help>Restart DNS Forwarding service</help> </properties> - <command>if cli-shell-api existsActive service dns forwarding; then sudo systemctl restart pdns-recursor.service; else echo "DNS forwarding not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name dns_forwarding</command> </leafNode> </children> </node> diff --git a/op-mode-definitions/firewall.xml.in b/op-mode-definitions/firewall.xml.in index 6a254ee11..b6ce5bae2 100644 --- a/op-mode-definitions/firewall.xml.in +++ b/op-mode-definitions/firewall.xml.in @@ -119,7 +119,7 @@ <properties> <help>Show summary of bridge custom firewall ruleset</help> <completionHelp> - <path>firewall bridge name ${COMP_WORDS[5]} rule</path> + <path>firewall bridge name ${COMP_WORDS[4]} rule</path> </completionHelp> </properties> <children> @@ -127,7 +127,7 @@ <properties> <help>Show list view of bridge custom firewall rules</help> <completionHelp> - <path>firewall bridge name ${COMP_WORDS[5]} rule detail</path> + <path>firewall bridge name ${COMP_WORDS[4]} rule detail</path> </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> @@ -299,7 +299,7 @@ <properties> <help>Show summary of IPv6 custom firewall ruleset</help> <completionHelp> - <path>firewall ipv6 name ${COMP_WORDS[5]} rule</path> + <path>firewall ipv6 name ${COMP_WORDS[4]} rule</path> </completionHelp> </properties> <children> @@ -307,7 +307,7 @@ <properties> <help>Show list view of IPv6 custom firewall rules</help> <completionHelp> - <path>firewall ipv6 name ${COMP_WORDS[5]} rule detail</path> + <path>firewall ipv6 name ${COMP_WORDS[4]} rule detail</path> </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> @@ -479,7 +479,7 @@ <properties> <help>Show summary of IPv4 custom firewall ruleset</help> <completionHelp> - <path>firewall ipv4 name ${COMP_WORDS[5]} rule</path> + <path>firewall ipv4 name ${COMP_WORDS[4]} rule</path> </completionHelp> </properties> <children> @@ -487,7 +487,7 @@ <properties> <help>Show list view of IPv4 custom firewall ruleset</help> <completionHelp> - <path>firewall ipv4 name ${COMP_WORDS[5]} rule detail</path> + <path>firewall ipv4 name ${COMP_WORDS[4]} rule detail</path> </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/firewall.py --action show --family $3 --hook $4 --priority $5 --rule $7 --detail $8</command> diff --git a/op-mode-definitions/igmp-proxy.xml.in b/op-mode-definitions/igmp-proxy.xml.in index 8533138d7..d6ad7ed7e 100644 --- a/op-mode-definitions/igmp-proxy.xml.in +++ b/op-mode-definitions/igmp-proxy.xml.in @@ -6,7 +6,7 @@ <properties> <help>Restart the IGMP proxy process</help> </properties> - <command>sudo systemctl restart igmpproxy.service</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name igmp_proxy</command> </node> </children> </node> diff --git a/op-mode-definitions/mdns-reflector.xml.in b/op-mode-definitions/mdns-reflector.xml.in index a90d4d385..115b2858c 100644 --- a/op-mode-definitions/mdns-reflector.xml.in +++ b/op-mode-definitions/mdns-reflector.xml.in @@ -53,7 +53,7 @@ <properties> <help>Restart mDNS repeater service</help> </properties> - <command>sudo systemctl restart avahi-daemon.service</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name mdns_repeater</command> </node> </children> </node> diff --git a/op-mode-definitions/monitor-bandwidth.xml.in b/op-mode-definitions/monitor-bandwidth.xml.in index 2da9d34f4..fc1d751d6 100644 --- a/op-mode-definitions/monitor-bandwidth.xml.in +++ b/op-mode-definitions/monitor-bandwidth.xml.in @@ -6,9 +6,10 @@ <properties> <help>Monitor interface bandwidth in real time</help> </properties> + <command>bmon --use-bit</command> <children> <tagNode name="interface"> - <command>bmon -b -p $4</command> + <command>bmon --use-bit --policy $4</command> <properties> <help>Monitor bandwidth usage on specified interface</help> <completionHelp> diff --git a/op-mode-definitions/restart-ntp.xml.in b/op-mode-definitions/restart-ntp.xml.in new file mode 100644 index 000000000..961fae252 --- /dev/null +++ b/op-mode-definitions/restart-ntp.xml.in @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="restart"> + <children> + <node name="ntp"> + <properties> + <help>Restart NTP service</help> + </properties> + <command>if cli-shell-api existsActive service ntp; then sudo systemctl restart chrony.service; else echo "Service NTP not configured"; fi</command> + </node> + </children> + </node> +</interfaceDefinition> 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> diff --git a/op-mode-definitions/restart-snmp.xml.in b/op-mode-definitions/restart-snmp.xml.in index 7de27df64..e9c43de01 100644 --- a/op-mode-definitions/restart-snmp.xml.in +++ b/op-mode-definitions/restart-snmp.xml.in @@ -6,7 +6,7 @@ <properties> <help>Restart SNMP service</help> </properties> - <command>if cli-shell-api existsActive service snmp; then sudo systemctl restart snmpd.service; else echo "Service SNMP not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name snmp</command> </node> </children> </node> diff --git a/op-mode-definitions/restart-ssh.xml.in b/op-mode-definitions/restart-ssh.xml.in index 543cafc24..914586df8 100644 --- a/op-mode-definitions/restart-ssh.xml.in +++ b/op-mode-definitions/restart-ssh.xml.in @@ -6,7 +6,7 @@ <properties> <help>Restart SSH service</help> </properties> - <command>if cli-shell-api existsActive service ssh; then sudo systemctl restart "ssh@*.service"; else echo "Service SSH not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name ssh --vrf "*"</command> </node> </children> </node> diff --git a/op-mode-definitions/reverse-proxy.xml.in b/op-mode-definitions/reverse-proxy.xml.in index 4af24880b..b45ce107f 100644 --- a/op-mode-definitions/reverse-proxy.xml.in +++ b/op-mode-definitions/reverse-proxy.xml.in @@ -6,7 +6,7 @@ <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> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name reverse_proxy</command> </node> </children> </node> diff --git a/op-mode-definitions/suricata.xml.in b/op-mode-definitions/suricata.xml.in index a5025afba..ff1f84706 100644 --- a/op-mode-definitions/suricata.xml.in +++ b/op-mode-definitions/suricata.xml.in @@ -16,7 +16,7 @@ <properties> <help>Restart Suricata service</help> </properties> - <command>if systemctl is-active --quiet suricata; then sudo systemctl restart suricata.service; else echo "Service Suricata not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name suricata</command> </node> </children> </node> diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in index b551af2be..0a8671aeb 100644 --- a/op-mode-definitions/vpn-ipsec.xml.in +++ b/op-mode-definitions/vpn-ipsec.xml.in @@ -112,7 +112,7 @@ <properties> <help>Restart the IPsec VPN process</help> </properties> - <command>if systemctl is-active --quiet strongswan; then sudo systemctl restart strongswan ; echo "IPsec process restarted"; else echo "IPsec process not running" ; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name ipsec</command> </node> </children> </node> diff --git a/op-mode-definitions/vrrp.xml.in b/op-mode-definitions/vrrp.xml.in index 34484c706..158e7093e 100644 --- a/op-mode-definitions/vrrp.xml.in +++ b/op-mode-definitions/vrrp.xml.in @@ -30,7 +30,7 @@ <properties> <help>Restart VRRP (Virtual Router Redundancy Protocol) process</help> </properties> - <command>sudo systemctl restart keepalived.service</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name vrrp</command> </node> </children> </node> diff --git a/op-mode-definitions/webproxy.xml.in b/op-mode-definitions/webproxy.xml.in index 57df44ff8..ba13907b8 100644 --- a/op-mode-definitions/webproxy.xml.in +++ b/op-mode-definitions/webproxy.xml.in @@ -34,7 +34,7 @@ <properties> <help>Restart WebProxy service</help> </properties> - <command>if cli-shell-api existsActive service webproxy; then sudo systemctl restart squid.service; else echo "Service WebProxy not configured"; fi</command> + <command>sudo ${vyos_op_scripts_dir}/restart.py restart_service --name webproxy</command> </node> </children> </node> |