Results 1 to 2 of 2

Thread: Park domain(s) on another account upon termination.

  1. #1
    Member dansgalaxy's Avatar
    Join Date
    Jan 2007
    Location
    Reading, UK
    Posts
    92
    cPanel/WHM Access Level

    Root Administrator

    Default Park domain(s) on another account upon termination.

    I am currently doing this process by hand, and am looking for how I might be able to achieve the same thing Automagically.

    Basically I need it so when an account is terminated (be it from WHM or API) the postkillact script parks all the domains on that account (unless the DNS zone was kept OR the domain(s) already have zones etc else where, and so long as the NS servers on the domains point to mine) onto another nominated cpanel account.

    As for example at the moment I have a "Terminated" account which has a Terminated holding page explaining this account has been terminated blah blah this is the webhost... So while users domains are still pointing to my servers I can at least get some low level advertising out of them

    How can I achieve this?

    Also, how could I have a script which runs on cron and checks if domains are still pointing to my server(s) and if not, unpark them to save dns zone clutter?

    Ps. If somecan write something nice for this willing to pay a modest amount, although if not pointers would be good for me to do it

    Cheers,
    Dan

  2. #2
    Member MattDees's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    Well, we can't write this for you, but I can certainlly tell you how.

    First of all, you will need to use two hook scripts:

    /scripts/prekillacct
    /scripts/postkillacct

    This is because that by the time postkillacct executes it will have removed all addon/sub/parked domains.

    The best way to do this is to have /scripts/prekillacct do lookups on the various types of domains via their API2 methods:

    cPanel/WHM Script Hooks
    WebHome < ApiDocs/Api2 < TWiki

    Store them into a flat file somewhere, let killacct do it's thing then use postkillacct to park them elsewhere.
    Matt Dees

Similar Threads

  1. Replies: 5
    Last Post: 09-09-2011, 12:24 PM
  2. Domain redirect to default web page after account termination?
    By jamesbond in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 11-03-2010, 09:04 AM
  3. Error from park wrapper: The following domain is not configured for this account
    By madan.cpanelnet in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 05-24-2007, 10:51 PM
  4. Proper way to park a domain for a sub account?
    By unomateo in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 02-05-2006, 02:27 PM
  5. Invalid Domain Error in Termination Account
    By bleucheese in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 10-03-2005, 05:00 PM