diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show/log/directory/node.def | 2 | ||||
-rw-r--r-- | templates/show/log/file/node.def | 2 | ||||
-rw-r--r-- | templates/show/log/file/node.tag/node.def | 5 | ||||
-rw-r--r-- | templates/show/log/node.def | 2 | ||||
-rw-r--r-- | templates/show/ntp/node.def | 2 | ||||
-rw-r--r-- | templates/show/ntp/node.tag/node.def | 2 |
6 files changed, 13 insertions, 2 deletions
diff --git a/templates/show/log/directory/node.def b/templates/show/log/directory/node.def new file mode 100644 index 0000000..481d36d --- /dev/null +++ b/templates/show/log/directory/node.def @@ -0,0 +1,2 @@ +help: Show listing of user-defined log files +run: ls /var/log/user/ diff --git a/templates/show/log/file/node.def b/templates/show/log/file/node.def new file mode 100644 index 0000000..4e91f06 --- /dev/null +++ b/templates/show/log/file/node.def @@ -0,0 +1,2 @@ +help: Show contents of user-defined log file + diff --git a/templates/show/log/file/node.tag/node.def b/templates/show/log/file/node.tag/node.def new file mode 100644 index 0000000..236515c --- /dev/null +++ b/templates/show/log/file/node.tag/node.def @@ -0,0 +1,5 @@ +help: Show contents of user-defined log file +allowed: local -a array ; + array=( /var/log/user/* ) ; + echo -n ${array[@]##*/} +run: if [ -f /var/log/user/$4 ]; then sudo cat /var/log/user/$4; else echo "no such file"; fi; diff --git a/templates/show/log/node.def b/templates/show/log/node.def new file mode 100644 index 0000000..820672e --- /dev/null +++ b/templates/show/log/node.def @@ -0,0 +1,2 @@ +help: Show contents of master log file +run: sudo sh -c "cat `ls /var/log/message* | sort -r` "
\ No newline at end of file diff --git a/templates/show/ntp/node.def b/templates/show/ntp/node.def index 2a53d0a..c56d291 100644 --- a/templates/show/ntp/node.def +++ b/templates/show/ntp/node.def @@ -1,2 +1,2 @@ help: Show date and time of network server [default: ntp.vyatta.com] -run: ntpdate -q ntp.vyatta.com +run: /usr/sbin/ntpdate -q ntp.vyatta.com diff --git a/templates/show/ntp/node.tag/node.def b/templates/show/ntp/node.tag/node.def index aa0dfaa..38828a8 100644 --- a/templates/show/ntp/node.tag/node.def +++ b/templates/show/ntp/node.tag/node.def @@ -1,3 +1,3 @@ help: Show date and time of given NTP server allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} -run: ntpdate -q ${3:-ntp.vyatta.com} +run: /usr/sbin/ntpdate -q ${3:-ntp.vyatta.com} |