Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Create text file when add / remove domain.

Discussion in 'General Discussion' started by joaosavioli, Feb 7, 2008.

  1. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    49
    Likes Received:
    10
    Trophy Points:
    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
     
  2. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    49
    Likes Received:
    10
    Trophy Points:
    58
    Hi,

    Please, help-me.
    It is very important.

    Thank you
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Instead of modifying /scripts/wwwacct, in cPanel 11 you should modify /scripts/postwwwacct for accounts created (/scripts/postkillacct for accounts terminated). Documentation on this is available at:

    http://www.cpanel.net/support/docs/hooks.htm
     
  4. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    49
    Likes Received:
    10
    Trophy Points:
    58
    Hi David!

    Thank you

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

    [root@linux]# cat /scripts/postkillacct
    cat: /scripts/postkillacct: No such file or directory

    Where are these files?

    Thank you!
    Joao
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,569
    Likes Received:
    45
    Trophy Points:
    308
    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
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice