summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-30 12:06:24 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-30 12:07:48 +0200
commit21669d633a66091336bbb2000bf620855fa03fe3 (patch)
tree86c1b4dc0c43fa4aff15e7b5284aa543f57bcfef
parentfd95a460cc8cac533d1ece820ee9087af7214a4f (diff)
downloadvyos-1x-21669d633a66091336bbb2000bf620855fa03fe3.tar.gz
vyos-1x-21669d633a66091336bbb2000bf620855fa03fe3.zip
op-mode: T3589: add "clear log" command to vacuume journald
(cherry picked from commit 3e6e4a1738dc2bcf173c6e450ad4d43dda54f283)
-rw-r--r--op-mode-definitions/clear-log.xml.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/op-mode-definitions/clear-log.xml.in b/op-mode-definitions/clear-log.xml.in
new file mode 100644
index 000000000..1f4a1aacd
--- /dev/null
+++ b/op-mode-definitions/clear-log.xml.in
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <children>
+ <leafNode name="log">
+ <properties>
+ <help>Clear contents of current master log file</help>
+ </properties>
+ <command>sudo journalctl --rotate --vacuum-time=1s</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>