#!/usr/bin/perl
# ldap_restart.cgi
# LDAP Services Restart 

 require './tarantella-lib.pl';
&foreign_require("proc", "proc-lib.pl");
&header($text{'index_ldaprestart'}, "", "ldaprestart");

 print "<hr><p>\n"; 
 print "<table width=100% border>\n";
 print "<tr $tb> <td><b>$text{'titidx_ldaprestart'}</b></td> </tr>\n";
 print "<tr $cb> <td><table width=100%>\n";

        $str=$config{'ldap_restart'};
	$exec_str="ldap";
        $cmd_str="restart";
        if (&run_cmd($str)) { 
                  print "</pre><tr><center><b>-- oOo --</b></center></tr>\n";
        } else {
                  print "<b>$text{'index_cmderr'}</b>\n"; 
        }
        if ( $config{ldap2_server}.length gt 0 ) {   
            $str=$config{'ldap2_restart'};
            if (&run_cmd($str)) { 
                      print "</pre><tr><center><b>-- oOo --</b></center></tr>\n";
            } else {
                      print "<b>$text{'index_cmderr'}</b>\n"; 
            }
        }
 print "<tr>\n";
 print "<tr>\n";
 print "</table></table><p>\n";
 &footer($text{'back_return'},$text{'index'});
 do "footer.pl";
 exit;



