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!

postkillacct $OPTS{'domain'} not work :(

Discussion in 'General Discussion' started by hekri, Mar 24, 2009.

  1. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    147
    Likes Received:
    2
    Trophy Points:
    168
    I have /scripts/postkillacct script:

    #!/usr/bin/perl
    my %OPTS = @ARGV;
    print "domain: $OPTS{'domain'} user: $OPTS{'user'}";


    User is ok but script dont print domain :( why?
     
  2. BrooksBridges

    BrooksBridges Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    156
    I have the same issue, and it would appear that the domain is not passed into postkillacct as it is with postwwwacct.

    From here:

    http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/ScriptHooks

    /scripts/postkillacct <user> <keepdns> - Runs after account termination. (/scripts/killacct) HASH (make sure to parse as a hash because keepdns or user could change order).

    Sure wish they *would* include it, since I'm using it to add and remove domains from postini...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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
    You could create /scripts/prekillacct instead so you can match that user to their domain(s) via the XML API (or other means) before the account is terminated.
     
  4. BrooksBridges

    BrooksBridges Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    156
    Actually, I did end up using prekillacct, and build a bit of script to parse out /var/cpanel/userdata/(username)/main to get the data I needed.

    The API calls ended up not being an option, since the lack of documentation made it almost impossible to understand.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. 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
    What data did you need? I can assist you with the APIs.

    Acquiring information by other methods is not guaranteed to continue working in the future.
     

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