summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorsrividya0208 <a.srividya@vyos.io>2021-06-16 13:42:22 -0400
committerDaniil Baturin <daniil@baturin.org>2021-06-20 09:23:11 +0200
commitbb42b60786f88fcebed09358d904e6d3118dce97 (patch)
tree84cc2060a2259bdd2b79f905f70820cb944b1a4e /templates
parent4d66efabb8a58e787b068a296a766dbae2576307 (diff)
downloadvyatta-op-bb42b60786f88fcebed09358d904e6d3118dce97.tar.gz
vyatta-op-bb42b60786f88fcebed09358d904e6d3118dce97.zip
op-mode: T3582: Fix the function of "delete log file" command
Added the compeletion help to show the list of the files and also changed the command to delete the file as the existing command was deleting the file and not recreating the file to write the new logs. So modified the command so that it will delete the content of the file.
Diffstat (limited to 'templates')
-rw-r--r--templates/delete/log/file/node.tag/node.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/delete/log/file/node.tag/node.def b/templates/delete/log/file/node.tag/node.def
index 95e46b6..ce4a4f7 100644
--- a/templates/delete/log/file/node.tag/node.def
+++ b/templates/delete/log/file/node.tag/node.def
@@ -1,2 +1,5 @@
help: Delete the specified log file
+allowed: local -a array ;
+ array=( /var/log/user/* ) ;
+ echo -n ${array[@]##*/}
run: sudo ${vyatta_bindir}/sudo-users/vyatta-delete-log-file.sh "$4"