summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-09-27 12:24:28 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-09-27 12:24:28 +0000
commit8f4880754da33ddc766a8b51adb99fef629c6b1f (patch)
tree8fcc913113573524cdb851e385edfb4c9ed9c03c
parent5fe0e9c163ee2f8229e298fc20dbfe6746c2cdcc (diff)
downloadvyos-1x-8f4880754da33ddc766a8b51adb99fef629c6b1f.tar.gz
vyos-1x-8f4880754da33ddc766a8b51adb99fef629c6b1f.zip
login: T4711: Terminate user TTY and PTS sessions
Ability to terminate user TTY and PTS sessions clear session pts/1
-rw-r--r--op-mode-definitions/clear-session.xml.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/op-mode-definitions/clear-session.xml.in b/op-mode-definitions/clear-session.xml.in
new file mode 100644
index 000000000..bfafe6312
--- /dev/null
+++ b/op-mode-definitions/clear-session.xml.in
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <children>
+ <tagNode name="session">
+ <properties>
+ <help>Terminate TTY or PTS user session</help>
+ <completionHelp>
+ <script>who | awk '{print $2}'</script>
+ </completionHelp>
+ </properties>
+ <command>sudo pkill -9 -t $3</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>