|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/libexec/webmin/stunnel/ |
Upload File : |
#!/usr/bin/perl
# Delete several SSL tunnels
require './stunnel-lib.pl';
&ReadParse();
&error_setup($text{'delete_err'});
@d = split(/\0/, $in{'d'});
@d || &error($text{'delete_enone'});
# Do the deletions
@stunnels = &list_stunnels();
foreach $d (sort { $b <=> $a } @d) {
$st = $stunnels[$d];
&lock_file($st->{'file'});
if (&get_stunnel_version(\$dummy) >= 4) {
if ($st->{'args'} =~ /^(\S+)\s+(\S+)/) {
$cfile = $2;
if ($cfile =~ /^\Q$module_config_directory\E\//) {
&lock_file($cfile);
unlink($cfile);
}
}
}
&delete_stunnel($st);
}
&unlock_all_files();
&webmin_log("delete", "stunnels", scalar(@d));
&redirect("");