home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Web Boards / WebForum_tar(2).Z / WebForum_tar(2) / WebForum / mkaccessfile < prev    next >
Encoding:
Text File  |  1995-01-19  |  929 b   |  52 lines

  1. #!/usr/local/bin/perl5
  2. #
  3. # mkaccess.pl: make an access file
  4. #
  5. # Copyright (C) 1994, Afzal Ballim
  6. #
  7. # Last Modified: Thu Jan 19 09:04:05 MET 1995
  8. # arguments: 1st is access file name
  9. #            2nd is password file name
  10. #            3rd is group file name
  11. #            if there's a 4th argument, that indicates that
  12. #              webforum should also be put into the group
  13.  
  14. $i=@ARGV[0];
  15. $pf=@ARGV[1];
  16. $gf=@ARGV[2];
  17. if ($#ARGV=3 && @ARGV[3] eq "all") {
  18.  $WF='all';
  19. } else {
  20.  $WF='master';
  21. }
  22.  
  23. open(F,">$i") || die "Couldn't make $i\n";
  24. print F <<EOM;
  25. AuthUserFile $pf
  26. AuthGroupFile $gf
  27. AuthName WebForum
  28. AuthType Basic
  29. EOM
  30.  
  31. if ($WF eq 'all') {
  32. print F <<EOM1;
  33. <Limit POST>
  34. require group webmasters
  35. require group webforum
  36. </Limit>
  37. <Limit GET>
  38. require group webmasters
  39. require group webforum
  40. </Limit>
  41. EOM1
  42. } else {
  43. print F <<EOM2;
  44. <Limit POST>
  45. require group webmasters
  46. </Limit>
  47. <Limit GET>
  48. require group webmasters
  49. </Limit>
  50. EOM2
  51. }
  52.