Virtualmin "Command to run after making changes to a server" differentiate between add/edit/delete

Posted by Josh on Server Fault See other posts from Server Fault or by Josh
Published on 2010-04-06T13:50:13Z Indexed on 2010/04/06 13:53 UTC
Read the original article Hit count: 631

Filed under:
|

I'm using Virtualmin, and I have a command set up under Virtualmin > Module Config > Actions Upon Server and user creation > Command to run after making changes to a server

This command is designed to perform a few additional steps after the account is set up. However, the action is called every time the account is modified, and also gets called when the account is deleted. The actions it performs should only be done when the account is first created.

How can my custom command know which action is being performed? Is there an environment variable which determines if the action is creation, alteration, or deletion?

© Server Fault or respective owner

Related posts about virtualmin

Related posts about custom-commands