mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 05:13:01 +02:00
cli: add 'show ntp [sources]' command to admin-exec
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Mattias Walström
parent
5adff79ad7
commit
66037ae2de
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Helper script to chronyc, checks if daemon is running
|
||||
|
||||
if ! chronyc serverstats >/dev/null; then
|
||||
echo "NTP client not enabled."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
tracking)
|
||||
chronyc tracking
|
||||
;;
|
||||
sources)
|
||||
chronyc sources -v
|
||||
;;
|
||||
*)
|
||||
echo "Unknown NTP command."
|
||||
;;
|
||||
esac
|
||||
@@ -250,6 +250,15 @@
|
||||
</SWITCH>
|
||||
</COMMAND>
|
||||
|
||||
<COMMAND name="ntp" help="Show NTP (client) status">
|
||||
<ACTION sym="script">ntp tracking</ACTION>
|
||||
<SWITCH name="optional" min="0">
|
||||
<COMMAND name="sources" help="Show NTP sources">
|
||||
<ACTION sym="script">ntp sources</ACTION>
|
||||
</COMMAND>
|
||||
</SWITCH>
|
||||
</COMMAND>
|
||||
|
||||
<COMMAND name="software" help="Show software info">
|
||||
<SWITCH name="optional" min="0" max="1">
|
||||
<COMMAND name="name" help="Show detailed info about a partition">
|
||||
|
||||
Reference in New Issue
Block a user