Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function modifies a server's /etc/cpupdate.conf file. This file controls how the server handles software updates and upgrades.

Warning:

  • You must authenticate as a root-level user to run this function.
  • We recommend that you run this function as a POST request with SSL enabled:
    • The length of the remote access key may cause problems if you run the function with the GET method (for example, a URL in your browser).
    • You risk security problems if you enter a remote access key through the GET method.
  • This function will only update the parameters for which you specify a value.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/update_updateconf?api.version=1&key=REMOTEACCESSKEY&UPDATES=daily
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/update_updateconf?api.version=1&key=UPDATES=daily
 Command Line
whmapi1 update_updateconf UPDATES=daily

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "update_updateconf"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>update_updateconf</command>
    </metadata>
</result>

Note:

Use WHM's API Shell interface (Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParametersTypeDescriptionPossible valuesExample
CPANELstring

The cPanel & WHM installation's release tier, or a valid version number.

If you do not use this parameter, the system retains the current setting.

Note:

New installations default to RELEASE.

  • A valid cPanel & WHM version number.
  • A valid release tier:
    • STABLE — This version has received considerable public exposure, testing, and verification.
    • RELEASE — This version is feature-complete and well-tested. It contains all intended features and functionality.

    • CURRENT — This version is tested and verified, but it may not contain all of the proposed functionality of a release. This tier is similar to the "release candidate" tier that other publication schemes use.
    • EDGE — This version only has rudimentary testing. The features are subject to further modification. This version usually lacks official public documentation.
RELEASE
RPMUPstring

The frequency with which the server updates the operating system distribution's RPM packages each time that the /usr/local/cpanel/scripts/upcp script runs.

If you do not set this parameter, the system retains the current setting.

  • daily — Update the RPM packages daily.
  • manual — Update the RPM packages manually.
  • never If you specify never, the server administrator must run the /usr/local/cpanel/scripts/rpmup2 script when they update the server's RPM packages.

daily
SARULESUPstring

The frequency with which the server updates Apache SpamAssassin's™ rules when the /usr/local/cpanel/scripts/upcp script runs.

If you do not set this parameter, the system retains the current setting.

  • daily — Update Apache SpamAssassin rules daily.
  • manual — Update Apache SpamAssassin rules manually.
  • never — If you specify never, the server administrator must run the /usr/local/cpanel/scripts/rpmup2 script when they update Apache SpamAssassin's rules.

     

daily
UPDATESstring

When the system will check for updates.

If you do not set this parameter, the system retains the current setting.

  • daily — Update cPanel & WHM automatically through a cron job every night at midnight.
  • manual — Update cPanel & WHM manually.
  • never — Do not update cPanel & WHM.
daily
STAGING_DIR string

The staging directory for updates.

If you do not set this parameter, the system retains the current setting.

A valid absolute directory path. /usr/local/cpanel

 

 

Returns

This function only returns metadata.