This function restarts a service, or daemon, on a server.
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 restart. For a list of possible values, read our Access Control List (ACL) documentation. Example: service=exim |
queue_task | integer Default: 0 Whether to queue this task.
Note: This parameter affects the Example: queue_task=0 |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ restartservice \ service='exim'
{- "data": {
- "output": "Waiting for httpd to restart..............finished.\\n\\nhttpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 21379\\nhttpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 21385\\n\\nhttpd started ok\\n",
- "service": "exim"
}, - "metadata": {
- "command": "restartservice",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}