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.

How to reset all domains to package defaults using Shell?

Discussion in 'General Discussion' started by nat, Feb 24, 2008.

  1. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    How to reset all domains to package defaults using Shell?



    Let's say I have 100 packages on 50 servers.

    I want to upgrade all domains that use all 100 packages on all 50 servers.

    I edited the packages on one server and copied them to /var/cpanel/packages on all servers. So now all servers have my new packages. But the domains that use those packages still do not have the features of the new packages.

    Right now in order to get the domains to use the new setting of the new packages, I have to Login to WebHost Manager on each server, click Edit Packages, select the Package, click Edit, click Edit again. 50 X 100 = 5000 times.



    It would be nice to run....

    /scripts/reset-domains-to-package-defaults

    Then type in the package name(s)

    Hit enter.

    Done.
     
    #1 nat, Feb 24, 2008
    Last edited: Feb 24, 2008
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    One solution you may want to pursue is to use the XML-API to create a central means by which you can edit packages on all servers. One can easily create a shell script that updates the packages on all servers. Using the XML-API will also act as if you modified the parameters via WHM so, like WHM, any modifications to the package should propagate automatically to all accounts using that package.

    XML-API documentation is available at:
    http://www.cpanel.net/plugins/xmlapi/index.html

    editpkg XML-API call information available at:
    http://www.cpanel.net/plugins/xmlapi/editpkg.html
     
Loading...

Share This Page