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?