The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Blog: cPanel 11.30

Discussion in 'cPanel Developers' started by MattDees, Feb 26, 2011.

  1. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The release of cPanel & WHM version 11.30 in EDGE is right around the corner. With this release we have made numerous changes, added a few features and fixed some bugs. Predominantly, these changes can be encompassed in a few bullet points:
    • Complete rewrite of update system
    • Addition of Cpanel::PublicAPI
    • Removal of Legacy Themes
    • Several new API calls
    Though each of these changes may seem small when listed as bullet points, there are a few details that you, as someone who customizes or integrates with cPanel & WHM should be aware of.

    Update System

    The rewrite of the cPanel & WHM update system (or upcp) has been a major project of ours for quite some time now. There are numerous improvements in this version, including the addition of long term support, better logging and many other benefits for both users and developers.

    Some parts of this change will have a major impact on developers. Most importantly, /scripts will be relocated to /usr/local/cpanel/scripts. When this happens, we will attempt to migrate the data in /scripts to /usr/local/cpanel/scripts and then backup /scripts and symlink /usr/local/cpanel/scripts to /scripts. There are a couple of scenarios where this will not happen:
    • if /scripts contains more than 5,000 files
    • if the size of /scripts is more than 100mB
    In this scenario, an email should be sent to the user asking them to resolve the issue. The user should also be updated to the latest version of 11.28 (rather than 11.30). In a standard cPanel install, or even a heavily customized one, this should not be an issue.

    Another major part of this change is the reworking of how RPMs are versioned with the product. Previously, an RPM has been tied to a specific tier. For example, exim may have a different version for EDGE and CURRENT. Now, the RPM version is tied to the version of the product. Thus,if you are running 11.30.3 in the EDGE tier or CURRENT tier, you will have the same version of exim. We will also be offering the ability to source RPMs from a custom repo. This means that, if you wish to provide your customer with your own version of ProFTPd or dovecot, it is now possible in a way that is supported (more on this in a future post).

    Also, /etc/cpupdate.conf now uses a different format for determining the prescribed version. This file will break the update tier and update method into separate tiers. A valid cpupdate.conf will now look something like:

    CPANEL=release
    UPDATES=manual

    Valid values for CPANEL are: stable, release, current, edge.
    Valid values for UPDATES are: automatic, manual, never.

    Addition of Cpanel::PublicAPI

    cPanel & WHM 11.30 contains the first version of Cpanel::PublicAPI, a perl module capable of querying APIs from a single interface. This module deprecates the old Cpanel::Accounting module and offers a few new pieces of functionality:
    • Automatic detection of credentials (when available)
    • Interfaces for querying API1, API2, xml-api and our DNS clustering system
    • Full legacy support for Cpanel::Accounting
    Eventually, a full set of modules will be available to query all of our APIs via any method available.

    Removal of Legacy Themes

    In cPanel & WHM 11.28, we dropped support for x, x2, bluelagoon and monsoon. Within the 11.30 release cycle, we will stop distributing them all together. If you develop a theme that is based off of one of these themes, we strongly suggest that you update to a theme using cPanel’s API2. If you require guidance updating your themes, you can always contact us via our ticket system.

    New API Calls & Hook

    We have added a few new API calls within version 11.30, specifically:

    xml-api:
    updateconfig - This call allows you to set your preferred release tier.

    api2:

    MysqlFE::adddb - Add a database
    MysqlFE::adduser - Add a Mysql user
    MysqlFE::adduserdb - Grant a user permission to access a DB
    MysqlFE::addhost - Allow a new host to access Mysql
    MysqlFE::deldb - Delete a database
    MysqlFE::deluser - Delete a user
    MysqlFE::delhost - Delete a host’s access
    MysqlFE::deluserdb - Remove a user’s permission to access a database
    Email::delforwarder - Allow deletion of Email Forwarders
    Email::adddomainforward - Add a domain forwarder

    Note: Documentation on these calls will be available once version 11.30 hits CURRENT.

    Hook:
    We have now added a “modifyacct” hook at /usr/local/cpanel/scripts/postmodifyacct and /usr/local/cpanel/scripts/premodifyacct. It will be passed all the new values for an account.
     
  2. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    For the pre/postmodifyacct, is it going to be called whenever anything is changed on an account, like adding a domain or when the quota or something is changed in the modify account menu in whm?
     
  3. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It will be hit when the Modify Account page in WHM is used or the modifyacct xml-api call.

    For what you are talking about - the CustomEventHandler is probably your best bet.
     
  4. bryyyon

    bryyyon Member

    Joined:
    Mar 1, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hooray!!

    We've been needing this for so long. Tailing the access_log isn't as fun as a nice hook.
     
  5. pakogah

    pakogah Member

    Joined:
    Nov 6, 2008
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    so I assume hook /usr/local/cpanel/scripts/postmodifyacct is not available on cpanel 11.28.xx ??
     
  6. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi pakogah,

    That is correct. The postmodifyacct hook is only available in version 11.30 and beyond.

    Regards,
    -DavidN
     
Loading...

Share This Page