Variable NEW_DOMAIN_TEMPLATE from event "Service plan of reseller created" is not created

Created:

2016-11-16 12:47:03 UTC

Modified:

2017-08-16 17:28:39 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Variable NEW_DOMAIN_TEMPLATE from event "Service plan of reseller created" is not created

Applicable to:

  • Plesk 11.x for Linux

Symptoms

Event Handler "Service plan of reseller created" was created, according to Administrator's guide:

http://download1.parallels.com/Plesk/PP11/11.0/Doc/en-US/online/plesk-administrator-guide/67897.htm

Here is the script:

#!/bin/bash

/bin/date >> /tmp/event_handler.log
echo "NEW_DOMAIN_TEMPLATE: ${NEW_DOMAIN_TEMPLATE}" >> /tmp/event_handler.log

But environment variable 'NEW_DOMAIN_TEMPLATE' does not have the name of the new service plan - it is empty.

Cause

This is Plesk internal issue PPPM-736 , which is expected to be fixed in future Plesk updates.

Workaround

Get the name of the new service plan using this script part:

#!/bin/bash

pass=`cat /etc/psa/.psa.shadow`
var=`mysql -uadmin -p"$pass" psa --skip-column-names -e"select name from Templates where id=(select max(t.id) from Templates t, clients c where t.owner_id=c.id and c.type='reseller')"`

echo "NEW_DOMAIN_TEMPLATE: $var" >> /tmp/event_handler.log
Have more questions? Submit a request
Please sign in to leave a comment.