Submitted by yngens on Sun, 10/21/2018 - 05:18
The help description for the field mentions only limited variables:
Virtualmin allows very flexible database creation and permissions. This field allows you to specify the default name of databases created as part of domains created from this template. By default Virtualmin uses the ${PREFIX} variable, which is the first part of the domain name, and will generally also be the domain owner login name for Webmin. It may be useful to change this, in some circumstances to include a prefix that indicates the template from which it was generated, or to include additonal information about the database. It is possible to combine variables and any characters that are allowed in a PostgreSQL and/or MySQL database (depending on which databases are available). Other substitutions available here include ${DOM} for the domain name, ${USER} for the administration user, ${UID} for Unix user ID number and ${GID} for the group ID.
Would be very nice if we could use other $VIRTUALSERVER variables like, for example, $VIRTUALSERVER_ID and $VIRTUALSERVER_CREATED, or for that matter all other $VIRTUALSERVER variables as template database name pattern.
By the way, there is a typo in additonal
, which should be additional
in the help text above.
Status:
Active
Comments
Submitted by andreychek on Sun, 10/21/2018 - 08:33 Comment #1
Submitted by JamieCameron on Sun, 10/21/2018 - 20:16 Comment #2
Actually you can use $ID and $CREATED in the DB name if you want.
And I will fix that typo..
Submitted by yngens on Mon, 10/22/2018 - 05:52 Comment #3
Excellent! So I guess all the variables without appending prefix $VIRTUALSERVER_ are available then? Would be nice to reflect that in the help text.
Submitted by JamieCameron on Tue, 10/23/2018 - 20:25 Comment #4
Yeah, I will bring the docs into sync for these variables