manually creating Custom Commands

Ubuntu 14.04 … local development.

My Custom Commands are located in file pairs in


If I wish to create a batch of these file pairs manually - instead of through webmin main GUI - what is the indexing system used to create the 10 digit file names?

Is there a file naming method in webmin I can call?

I’ve looked through to find reference to index ‘id’ (10 digit number) which prefixes command files in /etc/webmin/custom

# Save a custom command &open_lock_tempfile(FILE, ">$module_config_directory/$c->{'id'}.cmd");

Save HTML description file


but it’s still not clear how/where the file id’s are created.

Later edit:

I tried cloning an existing (working) file set and changed the file id’s manually using a random 10 digit number - 9123456789.cmd and 9123456789.html. I then restarted webmin.

This approach works and I see custom commands added in webmin.

But it would be interesting to understand the indexing method.

The file id appears to be a timestamp, in seconds since January 1, 1970. Try a web search for

unix date in seconds

and you will find recipes (and websites) for generating your own.