Support sending multiple commands to a running instance #502
Open
selvanair wants to merge 3 commits intoOpenVPN:masterfrom
Open
Support sending multiple commands to a running instance #502selvanair wants to merge 3 commits intoOpenVPN:masterfrom
selvanair wants to merge 3 commits intoOpenVPN:masterfrom
Conversation
Currently we support only one --command action arg type of option. Extend it to allow multiple such commands in one invocation. Trac OpenVPN#498 Signed-off-by: Selva Nair <selva.nair@gmail.com>
When sending multiple commands to a running instance of the GUI,
simplify usage like
openvpn-gui.exe --command connect vpn1 --command connect vpn2
--command disconnect vpn3
by omitting --command so that one could write
openvpn-gui.exe --connect vpn1 --connect vpn2 --disconnect vpn3
The form "--command action .. " was introduced originally to indicate that
these actions are only understood if there is an instance of the gui
already running as it just triggers a message for that action to be sent to
the first instance. But it becomes tedious when multiple commands are to
be specified.
This patch makes --action arg to also work the same way as
--command action arg. A side effect is that some of such options do not
make sense when launching the first instance of the GUI. In such cases,
the option is ignored but an error is logged to the eventlog. In particular,
use of options such as --command disconnect or --disconnect with the first
instance are no longer treated as a fatal error.
The allowed values of action are unchanged:
connect
disconnect
reconnect
disconnect_all
exit
status
silent_connection
import
rescan
out of which connect, silent_connection and import are the only
one's that could be handled by the first instance.
Example:
openvpn-gui.exe --connect vpn1 --connect vpn2
will start vpn1 and vpn2 if OpenVPN-GUI is not already running,
or cause a command to start those sent to a running instance.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make it possible to use --command action arg multiple times.
See Trac #498
Summary of commits:
(i) Usages like
--command connect vpn1 --command connect vpn2 --command disconnect vpn3when the GUI is already running is now supported.(ii) When sending multiple commands to a running instance of the GUI, simplify usage of the form
openvpn-gui.exe --command connect vpn1 --command connect vpn2 --command disconnect vpn3by omitting
commandso that one could also writeopenvpn-gui.exe --connect vpn1 --connect vpn2 --disconnect vpn3For connect this already worked, but do so for other commands too.(iii) copy resource file changes to all langauge files