From 8f4880754da33ddc766a8b51adb99fef629c6b1f Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko <v.gletenko@vyos.io> Date: Tue, 27 Sep 2022 12:24:28 +0000 Subject: login: T4711: Terminate user TTY and PTS sessions Ability to terminate user TTY and PTS sessions clear session pts/1 --- op-mode-definitions/clear-session.xml.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 op-mode-definitions/clear-session.xml.in (limited to 'op-mode-definitions') 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> -- cgit v1.2.3