• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

set event handler problem

Darko Bazulj

Basic Pleskian
Hi,

plesk : 12.0.18 Update #63

I'm playing with event manager but I have problem with setting simple event handler.
http://download1.parallels.com/Plesk/PP12/12.0/Doc/en-US/online/plesk-administrator-guide/59206.htm

I tested simple domain alias created event.

event : domain alias created
priority : 0
user : root
command : /usr/local/psa/bin/test-handler.sh


#!/bin/bash
echo "--------------" >> /tmp/event_handler.log
/bin/date >> /tmp/event_handler.log # information on the event date and time
/usr/bin/id >> /tmp/event_handler.log # information on the user, on behalf of which the script was executed (to ensure control)
echo "Domain alias added created" >> /tmp/event_handler.log # information on the created customer account
echo "Domain name: ${NEW_DOMAIN_ALIAS_NAME}" >> /tmp/event_handler.log # customer's name
#echo "Clien GUID: ${NEW_CLIENT_GUID}" >> /tmp/event_handler.log # customer's username in Plesk
echo "--------------" >> /tmp/event_handler.log
env >> /tmp/event_handler.log
echo "--------------" >> /tmp/event_handler.log

I don't get anything in the log file.

Is there any log which I can check what is happening with event or some other idea?

Regards,
Darko Bazulj
 
Hi, @Darko Bazulj!

It may be confusing but there are 2 events about creation of alias:
- Default domain, alias created (when alias is created for main domain)
- Domain alias created (When alias is creted for additional domain)

Some integrator use them. Check both of them.
 
Hi,

I've tested both events today but nothing is happening.
Maybe I'm missing something.

But I can't find any logs to see what is happening.

Do you have idea where to look or how to test to see what is happening?

Regards,
Darko Bazulj
 
Hi,

I have fixed the problem :)
I deleted everything, restarted server, checked script, permissions and created event handler, after that event handler started working.
Probably I was missing something but now I was cerfull.

Thank you for helping me.

Regards,
Darko Bazulj
 
Back
Top