While you can write Actions in any executable format, modifying an Action that ships with Xinet will illustrate some rules to keep in mind whether you’re customizing an existing Action or writing a new one. If you plan to write your own Actions rather than modify one that exists, please also refer to Background for writing your own Actions.In our example, we will customize the email Action so that it includes the file ID along with the file name, the HTML path, the keyword that changed, and the name of the user triggering the email:
1. Login as root.
2. Copy the email Action directory to a directory with a new name:
4. Rename all Action-name files: The files within the Action must match the name of the Action, so email and email.* must be renamed to new_email and new_email.*.
5.
6. Open the email script in a text editor (in our example, the file new_email) and edit the Set the usage message portion by changing:
7. Then search for the portion of the script that pertains to Check argument count to confirm correct usage. Just after the four lines that define case “-u”, insert four new lines, like this:Use the analogous methodology to modify the new_email.bat file.
1. You may wish to modify the file, name_of_action.desc, in order to differentiate the original Action for the newly-created one in the GUI.
2. When modifying an existing Action, do not simply edit it. Always make a copy to edit because Actions with the same name as those that ship with Xinet may be overwritten when you install future versions of Xinet.