Event Handlers in Plesk Explained

Posted at September 22, 2016 at 5:23 pm by Jithin

Event handlers are intended to help you get warnings about Plesk occasions. The most run of the mill approach to utilize them is as per the following: you make a script to be executed upon a specific Plesk event, and afterward you relate the event, and your script is utilizing an event handler. Every time the occasion occurs, the event handler will trigger your script. You can likewise relate event handlers with a framework charge or a double document. There are two truths to consider before you begin utilizing occasion handlers:

1) Event handlers trigger directions for the benefit of the Plesk admin.

2) Event handlers have data around a related Plesk object “before” and “after” an event.

At the point when an event happens, event handlers get the event subtle elements, and you can utilize these points of interest in your guidelines. For instance, you can acquire the IP address which was included by the “including an IP address” event. The event points of interest are passed to your guidelines as environment variables.

 

Running scripts via event handlers

For instance, we should store the names of new clients on the document framework. To do this, first we ought to discover nature variable that contains the contact name. This variable is recorded in the Administrator’s Guide, Appendix > Customer account created. As should be obvious, the variable name is NEW_CONTACT_NAME. At the moment, we have to make an event handler.

 

To create the event handler via Plesk

1) Sign into Plesk. Go to the Tools and Settings tab > Event Manager.

event-handler

 

2) Click Add New Event Handler and indicate the following:

event-handler

 

Event. Select Customer Account Created from the menu.

Priority. Leave set to least (0).

User. Leave set to root.

Command. Indicate the way the shell script was during step one (for instance,/tmp/write-names.sh).

3) Click OK.

The event handler will be set off each time another client record is made, and will compose the client’s contact name to the predetermined document.

 

If you need any further assistance please contact our support department.

 

 

0.00 avg. rating (0% score) - 0 votes

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply