summaryrefslogtreecommitdiff
path: root/op-mode-definitions/clear-session.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-27 16:03:26 +0200
committerGitHub <noreply@github.com>2022-09-27 16:03:26 +0200
commit53bd9fe11e449c66656fef9cb72084d5d0800a75 (patch)
tree1e00e2255f5b1096544c6a16a7f85818728d52b9 /op-mode-definitions/clear-session.xml.in
parentc22f9d76fb771ed22b62ed1ca4205fa7590cf816 (diff)
parent8f4880754da33ddc766a8b51adb99fef629c6b1f (diff)
downloadvyos-1x-53bd9fe11e449c66656fef9cb72084d5d0800a75.tar.gz
vyos-1x-53bd9fe11e449c66656fef9cb72084d5d0800a75.zip
Merge pull request #1562 from sever-sever/T4711
login: T4711: Terminate user TTY and PTS sessions
Diffstat (limited to 'op-mode-definitions/clear-session.xml.in')
-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>