PLESK EVENT MANAGER

Section 4.2 Register handler

Suppose, that our script is located in the /usr/local/psa/bin directory (for instance)(see chapter 4.3 "Example of handler"). Let's register it by creating an event handler via the control panel:

  1. Select the Server shortcut in the navigation pane.

  2. Click the Event Manager icon on the Server administration page. The Event Manager page will appear.

  3. Click the Add New Event Handler icon. The event handler setup page appears:

  4. Select the event, you wish to assign a handler to in the Event drop-down box.

  5. Select the priority for the handler execution, or specify a custom value. To do this, select Custom in the Priority drop-down list and type in the value. Note, when assigning several handlers to a single event you can specify the handler execution sequence, setting different priorities (higher value corresponds to a higher priority).

  6. Select the system user, on behalf of which the handler will be executed.

  7. In the Command input field, specify a command to be executed upon the selected event. In our example it is /usr/local/psa/bin/test-handler.sh <new_contact_name> <new_login_name>

  8. Click OK.

Note: In the command we have specified the parameters in the angle brackets <new_contact_name> and <new_login_name>. Before executing the handler, they will be replaced with name and login of the created client respectively. The entire list of available parameters is provided in the following section. You should keep in mind that with the removal operations, the parameters of the new_xxx type contain an empty string. And with creation operations the parameters of the old_xxx type contain an empty string.

to top