Required Files
Every module has its own directory under the Webmin base directory, in which all the module's CGI programs and configuration files must be stored. For example, if the Webmin base was /usr/local/webmin-1.090, a module called foobar would be installed in /usr/local/webmin-1.090/foobar.For a module to be displayed on the main Webmin menu, it should contain at least the following files. Only module.info is mandatory though.
- images/icon.gif
- The icon displayed on the main menu for this module. The icon should be
48x48 pixels, and should use the same colour scheme as the other
icons on the main menu.
- module.info
- This file contains information about the module and the operating
systems it runs under. Each line of the file is in the format
name=value
Required names and their values are:- name
- A short name for this module, such as FooAdmin.
- desc
- A longer description for the module, such as Foo Web Server.
This is the text that will appear below the icon on the main menu.
- os_support
- A space-separated list of operating systems that this module supports.
The module will only be displayed on the main menu if the OS Webmin
is running on is in the list, or if there is no os_support
line at all. Unless your module configures some service that only
exists on a few operating systems (such as XFree86), this line should
be omitted instead of trying to list all of those supported by
Webmin.
The actual operating system codes used in this line can be see in the third column of the os_list.txt file in the Webmin root directory, and are the same as those that can be appended to the names of config- files, as explained in the "Module Configuration" section. To specify only a certain version of some OS, add it to the OS name after a slash. For example, a module.info file might contain :
os_support=redhat-linux open-linux suse-linux/8.1
If your module supports all Linux distributions both no other operating systems, you can use the OS code *-linux in this line. - depends
- A space-separated list of other modules upon which this module depends.
If module foo depends upon module bar, then Webmin will prevent module bar
from being deleted while foo is still installed. Similarly, Webmin will
prevent foo from being installed if bar has not been.
The list can also contain a Webmin version (such as 0.75) that the module depends upon. In that case, installation of this module by an older version of Webmin will not be allowed.
- category
- This value determines which tab on the main Webmin page your module
will be categorised under. Supported values are webmin,
system, servers and hardware. If your
module.info file has no category line, it will appear
under the Others category.
- hidden
- In Webmin versions 1.140 and above, if this value is set to 1 the
module will not appear on the main menu, but will otherwise be fully
accessible. Useful for modules that contain only library functions or
scripts for command-line use.
- name
- lang/en
- The text strings used by this module, as explained in the
"Internationalization" section.
When you first create a new module, it will not be in the ACL of any Webmin user and so you will not be able to see it in the main menu. You must first delete the file /etc/webmin/module.infos.cache to clear the cache of known modules. Then to make your module visible, either edit the file /etc/webmin/webmin.acl, or use the Webmin Users module to grant yourself access.
