I'm trying to write a hook for these cases:
1. Addon domain add
2. Subdomain add
3. Parked domain add
After searching through Google and cPanel Docs, I have found that I should place some file in appropriate directory here /usr/local/cpanel/hooks/park (for parked domains) and /usr/local/cpanel/hooks/subdomain (for subdomains).
My questions are:
1. If this course of action is correct, where should I put a script for addon domains?
2. How should I name these files - addaddondomain, addsubdomain etc? What are correct answers?
3. Are they executable scripts and in which language I can write them - Python, shell, PHP, Perl?
4. Are they executed before or after the action?
What I want to do is just to write something into file / do a search&replace every time someone does some of these 3 actions.
1. Addon domain add
2. Subdomain add
3. Parked domain add
After searching through Google and cPanel Docs, I have found that I should place some file in appropriate directory here /usr/local/cpanel/hooks/park (for parked domains) and /usr/local/cpanel/hooks/subdomain (for subdomains).
My questions are:
1. If this course of action is correct, where should I put a script for addon domains?
2. How should I name these files - addaddondomain, addsubdomain etc? What are correct answers?
3. Are they executable scripts and in which language I can write them - Python, shell, PHP, Perl?
4. Are they executed before or after the action?
What I want to do is just to write something into file / do a search&replace every time someone does some of these 3 actions.