diff options
Diffstat (limited to 'util/cleancache.pl')
-rw-r--r-- | util/cleancache.pl | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/util/cleancache.pl b/util/cleancache.pl deleted file mode 100644 index cdd4426c..00000000 --- a/util/cleancache.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl -use lib '/home/bbs/bin/'; -use LocalVars; - -chdir '/home/bbs/'; -opendir(DIR, "cache") || die "can't open cache/ ($!) "; -foreach( readdir(DIR) ){ - if( index($_, $MYHOSTNAME) == 0 ){ - $hash{$_} = 1; - } -} - -closedir DIR; - -open USEDPID, "bin/shmctl listpid |"; -while( <USEDPID> ){ - chomp; - delete $hash{"${MYHOSTNAME}b$_"}; - delete $hash{"${MYHOSTNAME}f$_"}; - delete $hash{"${MYHOSTNAME}z$_"}; -} - -foreach( keys %hash ){ - print "$_\n"; - unlink "cache/$_"; -} |