Child pages
  • WHM API 1 Functions - update_updateconf

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description


Excerpt

This function modifies a server's /etc/cpupdate.conf file.

 This file controls how the server handles software updates and upgrades.


Warning
titleWarnings:
  • 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.


    • Include Page
      LIB:_RemoteAccessKeyDeprecated
      LIB:_RemoteAccessKeyDeprecated
    • 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.


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/update_updateconf?api.version=1&key=REMOTEACCESSKEY&UPDATES=daily



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/update_updateconf?api.version=1&key=UPDATES=daily



Expand
titleCommand Line


Code Block
languagebash
whmapi1 update_updateconf UPDATES=daily

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "update_updateconf"
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>update_updateconf</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

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
titleNote:

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.