OPNsense Forum

English Forums => General Discussion => Topic started by: Pecadis on May 16, 2019, 01:31:13 PM

Title: Enable (not start) a Plugin from Shell/Commandline
Post by: Pecadis on May 16, 2019, 01:31:13 PM
Hi everyone,

i'm not sure if that's the right place but i am currently struggling to find any sources which can explain how i can enable a plugin rather than just restart it with the configctl tool.

I would appreciate any input on that.

Thanks
Title: Re: Enable (not start) a Plugin from Shell/Commandline
Post by: franco on May 16, 2019, 06:51:34 PM
Hi,

We do not have command line tools that manipulate the state of /conf/config.xml for plugins. You can only operate services within the constraints set by config.xml from the GUI.


Cheers,
Franco
Title: Re: Enable (not start) a Plugin from Shell/Commandline
Post by: Pecadis on May 16, 2019, 07:53:38 PM
Hi Franco,

thank you for your feedback. That's at least a point i can work with =).

BR
Pecadis
Title: Re: Enable (not start) a Plugin from Shell/Commandline
Post by: franco on May 17, 2019, 10:06:02 AM
Hi Pecadis,

Having said this a short wrapper for editing config.xml might do what you want... worst case in PHP directly using the code. If you need help with that please let me know.


Cheers,
Franco
Title: Re: Enable (not start) a Plugin from Shell/Commandline
Post by: Pecadis on May 17, 2019, 01:52:04 PM
Hi Franco,

thanks for your offer, but i think that is easy to handle, basically just some File manipulation. A dedicated tool for that would be much more convenient. Wouldn't that be a nice feature? ;) maybe called "opnsense-plugin enable xxx"
Title: Re: Enable (not start) a Plugin from Shell/Commandline
Post by: mimugmail on May 17, 2019, 02:22:29 PM
Isn't this just a single API call (for most of the plugins)?