• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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