diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:31 +0000 |
commit | c9cf025fadfe043f0f2f679e10d1207d8a158bb6 (patch) | |
tree | 3a94effe0bdc0a6814d8134f4ed840d7cc6b6f19 /debian/apache2-bin.bug-script | |
parent | Adding upstream version 2.4.57. (diff) | |
download | apache2-c9cf025fadfe043f0f2f679e10d1207d8a158bb6.tar.xz apache2-c9cf025fadfe043f0f2f679e10d1207d8a158bb6.zip |
Adding debian version 2.4.57-2.debian/2.4.57-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/apache2-bin.bug-script | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/debian/apache2-bin.bug-script b/debian/apache2-bin.bug-script new file mode 100755 index 0000000..06944b0 --- /dev/null +++ b/debian/apache2-bin.bug-script @@ -0,0 +1,83 @@ +#!/usr/bin/perl -w + +use strict; +use Text::Wrap; +$Text::Wrap::columns = 70; + +#open (my $out, ">&=3") or die "could not open FD 3\n"; +open (my $out, ">&=0") or die "could not open FD 3\n"; + +our $AQUERY = 0; +our $PHP = 0; + +if (-x "/usr/sbin/a2query") +{ + $AQUERY = "/usr/sbin/a2query"; +} + +if ($AQUERY) +{ + my $mpm = `$AQUERY -M`; + chomp($mpm); + print $out "Enabled MPM: $mpm\n"; +} + + +my @modules; +if ($AQUERY) +{ + print $out "List of enabled modules:\n"; + @modules = `$AQUERY -m`; +} +else +{ + print $out "a2query is not available.\n"; + @modules = sort glob("/etc/apache2/mods-enabled/*.load"); + map { s{^/etc/apache2/mods-enabled/(.*)\.load$}{$1} } @modules; + print $out "List of /etc/apache2/mods-enabled/*.load:\n"; +} +if (! scalar @modules) { + print $out "Could not determine module list\n"; +} +else { + my $missing; + foreach my $m (@modules) { + my ($m, @desc) = split(/\s+/, $m); + if (-e "/etc/apache2/mods-available/$m.conf" and + ! -e "/etc/apache2/mods-enabled/$m.conf") { + $m .= "*"; + $missing = 1; + } + if ($m =~ /^(php\d)/) { + $PHP = $1; + } + } + + print $out wrap(" ", " ", "@modules\n"); + + print $out + wrap(" ", " ", + "(A * means that the .conf file for that module is not " . + "enabled in /etc/apache2/mods-enabled/)\n") + if $missing; +} + +if (defined $PHP) { + my @exts = qx{egrep ^extension= /etc/$PHP/apache2/php.ini /etc/$PHP/apache2/conf.d/* 2>/dev/null}; + if (scalar @exts) { + chomp @exts; + @exts = grep { ! m{\.dpkg-(?:bak|dist):} } @exts; + @exts = sort grep { s{^.*:extension=(\S+)\.\S+}{$1} } @exts; + print $out "List of enabled $PHP extensions:\n"; + print $out wrap(" ", " ", "@exts\n"); + } +} + + +if ($AQUERY) +{ + my @confs; + print $out "List of enabled configurations:\n"; + @confs = `$AQUERY -c`; + print $out wrap(" ", " ", "@confs\n"); +} |