
Appendix A. Advanced Features 257
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.
8 Click OK.
Note: In the script, we have specified the variables $NEW_CONTACT_NAME and
$NEW_LOGIN_NAME. During execution of the handler, they will be replaced with
name and login of the created client respectively. The entire list of available variables is
provided in the following section. You should keep in mind that with the removal
operations, the variables of type $NEW_xxx are not set. And with creation operations
the parameters of type $OLD_xxx are not set.
Now if you login to your Plesk control panel and create a new client, specifying the
value 'Some Client' in the Contact name field, and 'some_client' in the field Login, the
handler will be invoked, and the following records will be added to the
/tmp/event_handler.log:
Fri Mar 16 15:57:25 NOVT 2007
uid=0(root) gid=0(root) groups=0(root)
client created
name: Some client
login: some_client
If you want to specify one or few handlers more, repeat the actions above for another
handler.
The parameter templates that can be used when setting up an event handler are
presented in the tables below:
Parameter
name and
description
Environment variable name
For the event 'Session (login) settings changed'
Allowed
period of
inactivity
for all
control
panel
users