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!


Discussion in 'cPanel Developers' started by Branko, Jul 18, 2009.

  1. Branko

    Branko Active Member

    Sep 16, 2005
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    DataCenter Provider
    I've found that /usr/local/cpanel/whostmgr/bin/dnsadmin (script responsible for dns zone manipulating) have by default included execution of /var/cpanel/prednsadmin if it exists.

    I don't want to mess with dnsadmin script since it will be possibly overwritten via upcp if it should be updated with new features from cpanel.

    Anyway, what I want to do is put some custom code in prednsadmin script and depending of the outcome of those checks I would like it to stop or pass the dnsadmin script upon let's say creating new dns zones.

    To be more specific. In certain cases i don't want to allow creation/updates of dns zones via cpanel or whm. I want this script to stop it with some error codes.

    Question is, is this even possible trough prednsadmin script or should I turn my eyes to modifying a dnsadmin script?

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Apr 7, 2006
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    If your prednsadmin script exits with a non-zero value then the remainder of dnsadmin will not run. So yes, you can use /var/cpanel/prednsadmin to short-circuit dnsadmin.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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