is there a cli way to mass enable jailkit on all accounts on a server? it seems you can do it one at a time…i was hoping for a mass command.
so i assume i would have to go domain by domain in the cli then…i can do that in the gui…
Of course not. The CLI is meant to be scriptable, and can be used in loops or whatever. You can easily run any command on all domains (even commands without an --all-domains
option, which some have) by working on the list provided by list-domains
..
e.g.
for dom in $(virtualmin list-domains --name-only); do
virtualmin modify-domain --domain "$dom" --enable-jail
done
This is true of everything. The point of a CLI in the UNIX philosophy is making everything scriptable, not trying to make a specific command for every single possible action. A few tools linked together with pipes or whatever to do things in exactly the way you want.
1 Like