37 lines
1.4 KiB
Perl
Executable File
37 lines
1.4 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
# ldap_backup.cgi
|
|
# Backup LDAP Services
|
|
# STTA Rev. 1.3 Copyright (c) 2001-2004 Jesús Pérez Lorenzo --- license GNU GPL
|
|
# stta: (@#) 1.31051043346- [2004_01_29_102036]
|
|
|
|
require './stta-lib.pl';
|
|
&foreign_require("proc", "proc-lib.pl");
|
|
&headerstta($text{'index_ldapbackup'}, "", "ldapbackup",undef,1,0,"$text{'headpage_right'}"."$text{'head_logout'}",undef,undef,"$text{head_below}" );
|
|
|
|
print "<hr><p>\n";
|
|
print "<table width=100% border>\n";
|
|
print "<tr $tb> <td><font color='$revtext'><b>$text{'titidx_ldapbackup'}</b></td> </tr>\n";
|
|
print "<tr $cb> <td><table width=100%>\n";
|
|
print "<hr>\n";
|
|
print "<tr><td>\n";
|
|
$linstr=$config{'ldap_backup'}." ".$config{'ldap_backup_dir'}." ";
|
|
eval ("\$str=\"$linstr\"");
|
|
$exec_str="ldap";
|
|
$cmd_str="bakup";
|
|
if (&run_cmd($str)) {
|
|
print "<tr><td><center><b>-- oOo --</b></center></td></tr>\n";
|
|
if ( -r "$config{ldap_conf}" ) {
|
|
system("cp -p $config{ldap_conf} $config{ldap_backup_dir} ");
|
|
}
|
|
} else {
|
|
print "<tr><td><b>$text{'index_cmderr'}</b></td></tr>\n";
|
|
}
|
|
print "<tr>\n";
|
|
print "<tr>\n";
|
|
print "<tr>\n";
|
|
print "<tr><td><center>".&text('viewlog_action',$stta_sid)."</td></tr>";
|
|
print "</table></table><p>\n";
|
|
&footer($text{'back_return'},$text{'index'});
|
|
do "footer.pl";
|
|
exit;
|