.pdf)
WHM Plugins
restartservice function from within your custom script:
/xml-api/restartservice function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/restartservice
restartservice function from within your custom script:
/json-api/restartservice function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/restartservice
restartservice function takes the following required variable as input: named
interchange
ftpd
httpd
imap
cppop
exim
mysql
postgresql
sshd
tomcat
restartservice function. 1 — success.
0 — failure.
DNS Server (BIND)
Interchange Server
Ftp Service (ProFTPd/Pure-FTPd)
Apache Web Server
IMAP Server (Courier IMAP/WU IMAP)
POP3 Server (Courier POP3/cppop)
Exim Mail
MySQL Server
PostgresSQL Server
SSH Daemon
Tomcat Server
https://example.com:2087/xml-api/restartservice?service=httpd in WebHost Manager will produce output similar to:
<restartservice>
<restart>
<rawout>Waiting for httpd to restart..............finished.
httpd (/usr/local/apache/bin/httpd -k start -DSSL)
running as root with PID 19446
httpd (/usr/local/apache/bin/httpd -k start -DSSL)
running as root with PID 19452
httpd started ok
</rawout>
<result>1</result>
<service>httpd</service>
<servicename>Apache Web Server</servicename>
</restart>
</restartservice>
https://example.com:2087/json-api/restartservice?service=httpd will produce output similar to:
{
"restart":[
{
"result":1,
"service":"httpd",
"rawout":"Waiting for httpd to restart..............finished.\n\nhttpd
(/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 21379\n
httpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 21385
\n\nhttpd started ok\n",
"servicename":"Apache Web Server"
}
]
}