ispman/tasks DeleteVirtualHostDirectories_task.pl,NONE,1.1

Atif Ghaffar <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/tasks
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14718

Added Files:
	DeleteVirtualHostDirectories_task.pl 
Log Message:


--- NEW FILE: DeleteVirtualHostDirectories_task.pl ---
sub DeleteVirtualHostDirectories_task{
   my $params=shift;

   unless ($params->{"homeDirectory"}){
      print "Homedirectory not specified\n";
      return 0;
   }
   unless ( -d $params->{"homeDirectory"}){
      print "Homedirectory does not exists\n";
      return 0;
   }

   unless ($params->{"homeDirectory"}=~m!^/\w+\d*?/\w+\d*/!){
      print "Home directory too shallow. Too afraid to delete it\n";
      return 0;
   }

   push @cmd, "rm -rf $params->{'homeDirectory'}";

}




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.