i want to monitor, stop and stop a service. but cant get a clue hot to do that.
the monitor is ok by using this code:
<pre><p></p>
<span class="style1"><b>Service asterisk:</b> </span>
<?php system("/var/www/html/cam/mysql.sh"); ?></br>
</pre>
and in the file services.sh
service mysql status
i have also use:
<?php
$mysql = shell_exec('service mysqld stop');
echo "<pre>$mysql</pre>";
?>
but i am getting the error below:
================================
Stopping MySQL: [FAILED]
=======================================
but how to include a start and stop button and make it work.
thanks in advance