From e982b78f24d1dca3d2bc92a39b8e9fcf35b39a37 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Jan 2021 14:31:48 +0100 Subject: xml: op-mode: add preprocessor support as known from configuration mode --- op-mode-definitions/show-ntp.xml.in | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 op-mode-definitions/show-ntp.xml.in (limited to 'op-mode-definitions/show-ntp.xml.in') diff --git a/op-mode-definitions/show-ntp.xml.in b/op-mode-definitions/show-ntp.xml.in new file mode 100644 index 000000000..b7f0acdf8 --- /dev/null +++ b/op-mode-definitions/show-ntp.xml.in @@ -0,0 +1,31 @@ + + + + + + + Show peer status of NTP daemon + + if ps -C ntpd &>/dev/null; then ntpq -n -c peers; else echo NTP daemon disabled; fi + + + + Show date and time of specified NTP server + + + + + /usr/sbin/ntpdate -q "$4" + + + + Show NTP operational summary + + if ps -C ntpd &>/dev/null; then ntpq -n -c sysinfo; ntpq -n -c kerninfo; else echo NTP daemon disabled; fi + + + + + + + -- cgit v1.2.3