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:
Select the Server shortcut in the navigation pane.
Click the
Event Manager icon on the
Server administration page.
The Event Manager page will
appear.
Click the
Add New Event Handler icon.
The event handler setup page appears:

Select the event, you wish to assign a handler to in the Event drop-down box.
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).
Select the system user, on behalf of which the handler will be executed.
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>
Click OK.