doc: document optional message parameter for management command client-kill
PATCH 1/1 doc: document optional message parameter for management command client-kill
From: Sarvagya Chaturvedi <[email protected]>
The client-kill command in the management interface accepts an optional message parameter (M), which is sent to the client as a control channel command before terminating the session on the server.
Document the syntax of client-kill, the message format (RESTART or HALT with optional flags [P] and [N] and human-readable message), and the resulting notifications emitted on the client management interface.
Github: OpenVPN/openvpn#1096
--- doc/management-notes.txt | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
doc/management-notes.txt +26 -1
@@ -828,11 +828,36 @@ COMMAND -- client-kill (OpenVPN 2.1 or higher) Immediately kill a client instance by CID. - client-kill {CID} + client-kill {CID} [M] CID -- client ID. See documentation for ">CLIENT:" notification for more info. +M -- optional message to send to the client before termination +(defaults to "RESTART"). The format of M is: + + RESTART|HALT[,[flags][human-readable-message]] + +RESTART instructs the client to perform a restart (SIGUSR1). +HALT instructs the client to exit (SIGTERM). + +Optional flags in brackets: +- [P] -- preserve cached passwords and credentials on client (avoids purging auth). +- [N] -- advance to the next remote server entry in client configuration. + +If a human-readable message string is included after the comma, it is +logged by the client and forwarded to the client's management interface +via a ">NOTIFY:" event: + + >NOTIFY:info,server-pushed-connection-reset,<msg> (for RESTART) + >NOTIFY:info,server-pushed-halt,<msg> (for HALT) + +If the message parameter contains spaces, it should be enclosed in double +quotes, for example: + + client-kill 1 "HALT,Server shutting down for maintenance" + client-kill 1 "RESTART,[P]Reconnecting to update configuration" + COMMAND -- remote-entry-count (OpenVPN 2.6+ management version > 3) -------------------------------------------------------------------
Signature · 8 lines
2.43.0 _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Thanks for that. Documentation improvements are always welcome :-) - that it took so long to get merged was due to other distractions ("crash bugs in DCO" and such stuff ;-) ).
Your patch has been applied to the master and release/2.7 branch (docs).
commit c53ed7dab126ebe110520e461c6e482e9a136fa2 (master) commit 779cd934714237473fda39cc1d1042d7f8fe4b4b (release/2.7)
Author: Sarvagya Chaturvedi Date: Mon Sep 21 15:42:08 2026 +0200
doc: document optional message parameter for management command client-kill
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg39365.html
--
kind regards,
Gert Doering
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel