Create text file when add / remove domain.

joaosavioli

Well-Known Member
Feb 7, 2008
67
12
58
Hi everyone,

I need create a text file when a domain is created and removed.
domaintest.com created
domaintest2.com removed
domaintest3.com removed
domaintest123.com created

I edited the file /scripts/wwwacct, but not worked.
system("echo $domain created >> /root/log.txt");

File /scripts/killacct:
system("echo $domain removed >> /root/log.txt");


My cpanel verion is 11.
I had this in old cpanel version, but cpanel 11, I can´t.

Please, help-me.

Joao
 

joaosavioli

Well-Known Member
Feb 7, 2008
67
12
58
Hi David!

Thank you

But, I can´t locate this file.
Look:
[[email protected]]# cat /scripts/postkillacct
cat: /scripts/postkillacct: No such file or directory

[[email protected]]# cat /scripts/postkillacct
cat: /scripts/postkillacct: No such file or directory

Where are these files?

Thank you!
Joao
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
YOu have to create those files and make them executable:

Code:
touch cat /scripts/postkillacct
chmod +x cat /scripts/postkillacct