Hello

I'm trying to mod my cpanel box that everytime when a user create/delete/edit a subdomain a script is executed. So I searched a lot and found some good looking files on my server in /usr/local/cpanel/hooks/.

But I'm not sure how to propper write a script, I prefer bash to write my scripts. How must my script looks if I want that everytime when a user create a subdomain a file is copied in the new folder? I just need an example to understand.

I found only listsubdomains.example in /usr/local/cpanel/hooks/subdomain/, I assume that the script which should executed on subdomain creation should called addsubdomain, right?

Thanks for a little think input