Sha256: 462146a42d34dc208184329c44225956e361ee551234aed41e78710d0e98b2ee

Contents?: true

Size: 843 Bytes

Versions: 47

Compression:

Stored size: 843 Bytes

Contents

#!/usr/bin/perl

=begin

Generates Ubuntu style module.load files.
 
./apache2_module_conf_genereate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available

ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.

=cut

use File::Find;

use strict;
use warnings;

die "Must have '/path/to/modules' and '/path/to/modules.load'"
  unless $ARGV[0] && $ARGV[1];

find(
  {
    wanted => sub {
      return 1 if $File::Find::name !~ /\.so$/;
      my $modfile = $_;
      $modfile =~ /mod_(.+)\.so$/;
      my $modname  = $1;
      my $filename = "$ARGV[1]/$modname.load";
      unless ( -f $filename ) {
        open( FILE, ">", $filename ) or die "Cannot open $filename";
        print FILE "LoadModule " . $modname . "_module $File::Find::name\n";
        close(FILE);
      }
    },
    follow => 1,
  },
  $ARGV[0]
);

exit 0;

Version data entries

47 entries across 47 versions & 3 rubygems

Version Path
auser-poolparty-1.1.4 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.1.5 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.1.6 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.1.7 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.0 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.1 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.10 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.11 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.12 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.2 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.3 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.4 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.7 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.8 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.2.9 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.3.0 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.3.1 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.3.10 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.3.11 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl
auser-poolparty-1.3.12 vendor/chef/apache2/files/default/apache2_module_conf_generate.pl