-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed feature: restart services (like openvpn client) from the command prompt of opnsense #412
Comments
|
some additional info from the forum, configd calls might look like: configctl openvpn client list |
|
oh.. have been looking for that.. would be great to have it in the docs somewhere (CLI reference .. ) |
|
Another use case from the forum. Is it possible to mix 'php' and 'configd' in openvpn.inc openvpn_services() and add the corresponding service actions? |
|
That's not intentional as we would rather want to flush out the PHP usage altogether. There is a relatively new tool called "pluginctl" which can restart plugin configure calls, but in order for this to work the plugin must implement and advertise a respective plugin configure hook in its xxx_configure() function. |
Yes, that's what I thought.
But we need to restart VPN clients. Not reconfigure. |
|
same thing, the old code always reconfigures... so this is a feature request for openvpn? I did the low-level pluginification a while back so it's not so hard to push a command through pluginctl like: I guess that is what you want? :) |
|
Exactly! |
|
I thought there was a catch to this ;) The ids are just numbers.... we don't even have to specify server or client. What kind of mapping do you want to do? |
|
I need the client id for the Monit start/stop scripts. |
|
It's a bit of a chicken-egg problem with the VPN ID. We can make it visible, but how do we link it to monit reliably? It needs a better tracking via UUID so we can list OpenVPNs in Monit, or at least some OpenVPN selector field type to make that magic happen. |
|
Right, I think it's mandatory that os-monit offer references to services, openvpn clients and much more if it is to be integrated in the core system. |
|
Sounds good. I'll take care of the pluginctl commands required here for now. |
|
It's possible to reload from the command line now: Beyond this the utility is not strictly needed. |
This comment has been minimized.
This comment has been minimized.
At least for me this did not work (version: OPNsense 19.7.10). What did however work was: |
|
Hi together, pluginctl -s openvpn restart is working for me, too. But only for server1. Is there a option to restart server2 server3? Best reguards marc, |
|
See cf1f4e0 |
|
Could someone share the magic command for restarting the only vpn client configured from the command line? Apparently You can even miss to give the last two args and will to the same thing. |
|
I am afraid this does not help me because my pfsense is only an openvpn client and not a server. It only has one client configured and no servers. Based on the forum link I suspect that that command works only for restarting servers, not clients. |
|
If you only have one client you should not have a problem prior to the patch. As said earlier "pluginctl -s openvpn restart" restarts the first OpenVPN instance it finds. |
Today we cannot restart services (in my case, I needed to restart openvpn client) from the command prompt in opnsense. In PFsense there is the pfSsh.php that can be invoked to do that, but I have not found a similar one in OpnSense.
I think it would be a great feature do add to github.
The text was updated successfully, but these errors were encountered: