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!

get_tweaksetting list keys

Discussion in 'cPanel Developers' started by sparek-3, Jun 8, 2015.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,675
    Likes Received:
    84
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    Is there an API function or some way to list available tweak setting keys?

    To replicate settings from one server to another, would this be a feasible action?

    Iterate through get_tweaksetting keys, getting the keys and respective values on Server A. Then set_tweaksetting for each key and value on Server B.

    But in order to do this, get_tweaksetting has to know what key to look for.

    May not be feasible. Thought I'd ask.
     
  2. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    I don't think there is however, there is nothing stopping you from trolling the API documentation, getting the keys and adding them to an array.

    Then simply iterate through the array running your function on each.

    If it helps, those settings are stored here:
    Code:
    /var/cpanel/cpanel.config
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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