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.

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,381
    Likes Received:
    23
    Trophy Points:
    38
    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
    
     
Loading...

Share This Page