Okay I have tried it and here the result..
first you make scripts/hooks above if not exist before.
chmod +x the scripts/hooks so it's executable
then add your own bash script.
if you adding hooks: run /usr/local/cpanel/bin/register_hooks
Code:
# cat /scripts/postkillacct
# calling my own script
/root/scripts/hookcheck.sh AccountDeleted
# cat /root/scripts/hookcheck.sh
#!/bin/bash
date >> /root/scripts/hookcheck.log
echo $1 >> /root/scripts/hookcheck.log
one things odd, is that when I am restoring a cpanel account, it calling /scripts/postwwwacct before then /scripts/postrestoreacct. here's from my log
Code:
Wed May 4 20:08:50 WIT 2011
AccountCreated
Wed May 4 20:08:59 WIT 2011
AccountRestored
..just 9 second separated..
WHY??