summaryrefslogtreecommitdiff
path: root/scripts/cleanthem.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cleanthem.pl')
-rw-r--r--scripts/cleanthem.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/cleanthem.pl b/scripts/cleanthem.pl
new file mode 100644
index 0000000..18d68b0
--- /dev/null
+++ b/scripts/cleanthem.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+
+my %mysqltables=("gpg"=>"gpg","client"=>"emailcerts","server"=>"domaincerts","orgclient"=>"orgemailcerts","orgserver"=>"orgdomaincerts");
+
+sub mysql_query($)
+{
+ $dbh->do($_[0]);
+}
+
+my $aktiv=1;
+
+foreach my $dir (("../csr","../crt"))
+{
+ my $dirhandle;
+ opendir($dirhandle,"../csr");
+ while($_=readdir($dirhandle))
+ {
+ if(! -s "$dir/$_" and -f "$dir/$_" and !-d "$dir/$_")
+ {
+ print "Loesche $dir/$_\n";
+ unlink "$dir/$_";
+ }
+ }
+}