1

I tried to find the virtualmin API command to change the available features and plugins, like I can do it on the UI in System Settings > Features and Plugins.

It seems there is not.

Also it's the same issue for some Virtualmin Configuration in System Settings.

Is someone has already done it ?

Xorax
  • 280
  • 4
  • 12

3 Answers3

2

This can be done using the "set-global-feature" command.

e.g.:

# virtualmin set-global-feature --disable-feature webalizer

And, if you ever find something that cannot be accomplished from the command line that is possible in the UI, it's probably a bug, and one that we'll address. You can file a ticket at Virtualmin.com for things like that. There are some things that aren't reasonable on the command line, like the system status graphs, but generally if it's something you could reasonably want to do from a script, we'd like to make it easy to do. I believe API coverage is very close to complete, but every once in a while new stuff comes up.

The usage for this command is:

Turns on or off some Virtualmin feature or plugin globally.

virtualmin set-global-feature --enable-feature name
                          --disable-feature name
                          --default-on name
                          --default-off name

And, I've noticed we haven't regenerated the documentation lately, so the man page for that command is missing from our online documentation. I'm working on that now.

swelljoe
  • 1,414
  • 8
  • 12
  • Thanks ! Also I would like to do the same for other options in Virtualmin Configuration > System Settings, like passwd_mode, newdom_bcc, from_addr, post_command (scrip uppon domain creation)... also for change the shell availables (what we see with `virtualmin list-available-shells`) – Xorax Dec 13 '14 at 01:09
  • Look also to my other question please : http://serverfault.com/questions/652575/how-to-list-enabled-features-of-a-domain-in-virtualmin-api – Xorax Dec 21 '14 at 16:37
0

There are some for features: You can do these commands for features: list-features, enable-feature, disable-feature. for plugins you can only list them.

Look into this:

https://code.google.com/p/virtualmin-php-api/

Danila Ladner
  • 5,241
  • 21
  • 30
  • The comments to list-features, enable-feature... etc are designed to be applied by domain, not globaly as in the System Settings > Features and Plugins menu. – Xorax Sep 15 '13 at 15:06
0

The only way I found is to modify config files directly.

They are in /etc/webmin/virtual-server/ on Debian.

And then restart webmin :

service webmin restart
Xorax
  • 280
  • 4
  • 12