summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/show/log/directory/node.def2
-rw-r--r--templates/show/log/file/node.tag/node.def6
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/show/log/directory/node.def b/templates/show/log/directory/node.def
index 481d36d..6347082 100644
--- a/templates/show/log/directory/node.def
+++ b/templates/show/log/directory/node.def
@@ -1,2 +1,2 @@
help: Show listing of user-defined log files
-run: ls /var/log/user/
+run: test -d /var/log/user && ls /var/log/user/
diff --git a/templates/show/log/file/node.tag/node.def b/templates/show/log/file/node.tag/node.def
index 236515c..443458a 100644
--- a/templates/show/log/file/node.tag/node.def
+++ b/templates/show/log/file/node.tag/node.def
@@ -2,4 +2,8 @@ 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;
+run: if [ -f /var/log/user/$4 ]; then
+ cat /var/log/user/$4;
+ else
+ echo "no such file";
+ fi