cPanel XMLAPI - restartservice


DESCRIPTION

This function restarts a service on the server.


VARIABLES

INPUT

service
Service to restart (bind | interchange | ftp | httpd | imap | cppop | exim | mysql | postgres | ssh | tomcat)

OUTPUT

restartservice
Restart service information container.

restart
Restart call content.

rawout
Raw restart command output in HTML

result
Result of the restart (1 = successful, 0 = failed)

service
Service short name

servicename
Full Service Name (DNS Server (BIND) | E-Commerce Server (Interchange) | Ftp Service (Proftpd/PureFTPd) | Web Server (Apache) | IAMP Server (courier-imap/uwimap) | POP3 Server (courier-pop/cppop) | Mail Server (Exim) | SQL Server (MySQL) | SQL Server (PostgreSQL) | SSH Server (OpenSSH) | Tomcat Server)


EXAMPLES

Calling this URL in WebHost Manager: /xml-api/restartservice?service=tomcat

will produce something similar to:

<restartservice>

    <restart>
    <rawout>
    <table border="0" width="100%">
        <tr>
        <td>Attempting to restart tomcat</td>
        <td><img src=/gears.gif></td>
        </tr>
        </table>

Waiting for tomcat to restart....

.

.

.

.

.

finished.

<br /><br />

<fieldset><legend>tomcat status</legend>

    <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
        <td><font size="-1"><pre>

</pre></font></td>

        </tr>
    </table>

</fieldset>

tomcat has failed, please contact the sysadmin (result was ``tomcat is not installed'').

</rawout>

<result>0</result>

<service>tomcat</service>

<servicename>Tomcat Server</servicename>

</restart>

</restartservice>


COPYRIGHT

Copyright 2007 cPanel Inc.