This function enables or disables a service and its monitoring.
Note:
If the user only possesses the clustering
Access Control List (ACL),
then this function can only act on the named
service.
service required | string The service to configure. For more information about each service, read our Service Manager documentation. Example: service=mysql |
enabled | integer Whether to enable the service.
If you do not use this parameter, the function will not change the enabled status of the service. Warning: Do not use this function to disable the Example: enabled=1 |
exim-altportnum | string Default: 26 A port or list of comma-separated ports on which Exim will listen for inbound connections. Note: The function only uses this parameter if you set Example: exim-altportnum=26, 5000, 6000 |
monitored | integer Whether to monitor the service in WHM's Service Status interface (WHM >> Home >> Server Status >> Service Status).
If you do not use this parameter, the function will not change the monitoring status of the service. Example: monitored=1 |
HTTP Request was successful.
object |
whmapi1 --output=jsonpretty \ configureservice \ service='mysql'
{- "metadata": {
- "command": "configureservice",
- "reason": "Enabled monitoring for mysql.",
- "result": 1,
- "version": 1
}
}