petar.company/mail-restart.php
2025-03-01 00:58:18 +01:00

50 lines
1.4 KiB
PHP

<?php
include_once("./include/cfg-petar.php");
include_once("./include/cfg-mail.php");
include_once("./include/layout.php");
include_once("./include/users.php");
include_once("./include/db.php");
?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-header.php';?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-top.php';?>
<!-- ------------------------------------------------------------------------ -->
<tr bgcolor=navy align=center>
<td colspan=2><font color=yellow><b>Sendmail Restart</b></font></td>
<?php
if ($mail_mode == "full") { $PARAM="MAL"; } else { $PARAM="FWD"; }
if ($PARAM=="MAL") { $TABLE="MAILUSER"; } else { $TABLE="FWDUSER";}
echo "<tr>".
"<td colspan=2>";
echo "<p>+ [ <strong>DB rebuild TABLE: $TABLE</strong> ]<br>";
$output = shell_exec("/usr/local/bin/sudo ".$mng_user." ".$PARAM);
echo "<p>".
"<pre>$output</pre>";
echo "<p>+ [ <strong>SRV restart</strong> ]<br>";
$output = shell_exec("/usr/local/bin/sudo ".$mng_user." SRV ");
echo "<p>".
"<pre>$output</pre>";
echo "</td></tr>";
?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-footer.php';?>
<!-- ------------------------------------------------------------------------ -->