GICT knowledge base
Event Handlers in Plesk
Published
Event handlers are intended to help you get warnings about Plesk occasions. The most run of the mill approach to utilizing 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.
2) Click Add New Event Handler and indicate the following:
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.
Related guides
cPanel and Plesk notice: Awstats,. Webalizer and Analog stats are being removed
Important Update: cPanel and Plesk Phasing Out Legacy Statistics Tools If you regularly check your website traffic through your hosting control panel, we have an...
PleskUnderstanding the db_owner Role in Plesk Windows Hosting
If you have ever managed a database on a Windows-based hosting plan using Plesk, you might have noticed that your database user doesn’t always start with "full"...
PleskUsing Nmcli to Set a Static IP (Replacing DHCP) on AlmaLinux (RHEL Based) – Recommended for control panel systems
If you have been managing servers for a while, you probably remember the days when control panels like cPanel and Plesk absolutely hated NetworkManager.
PleskEmail Management in Plesk
In this article we are going to discuss about Email management in Plesk control panel.


