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