diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-09-27 12:24:28 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-09-27 12:24:28 +0000 |
commit | 8f4880754da33ddc766a8b51adb99fef629c6b1f (patch) | |
tree | 8fcc913113573524cdb851e385edfb4c9ed9c03c /op-mode-definitions | |
parent | 5fe0e9c163ee2f8229e298fc20dbfe6746c2cdcc (diff) | |
download | vyos-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
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/clear-session.xml.in | 16 |
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> |