admserv/cgi-src40/repl-monitor-cgi.pl.in | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
New commits:
commit f733c904293bb50ac2c5bcfc441b527fcec30e19
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Jan 30 14:53:53 2015 -0800
Ticket #48024 - repl-monitor invoked from adminserver cgi fails
Description: A generated file by a cgi script requires the "Content-
Type: text/html" at the top. This patch adds it. Also, removing
the old default config file path, e.g., /etc/dirsrv/eplmon.conf,
which we don't include any more.
https://fedorahosted.org/389/ticket/48024
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
diff --git a/admserv/cgi-src40/repl-monitor-cgi.pl.in
b/admserv/cgi-src40/repl-monitor-cgi.pl.in
index 5529454..3a7cc05 100755
--- a/admserv/cgi-src40/repl-monitor-cgi.pl.in
+++ b/admserv/cgi-src40/repl-monitor-cgi.pl.in
@@ -43,15 +43,7 @@ use CGI;
my $query = CGI->new;
@ARGV = (); # clear it out
-if ( $query->url_param('configfile') eq "" ) {
- my $configfile;
- if ($ENV{DS_CONFIG_DIR} and -d $ENV{DS_CONFIG_DIR}) {
- $configfile = "$ENV{DS_CONFIG_DIR}/@instancename(a)/replmon.conf";
- } elsif ("@instconfigdir@" and -d "@instconfigdir@") {
- $configfile = "@instconfigdir(a)/replmon.conf";
- }
- push @ARGV, '-f', $configfile;
-} else {
+if ( $query->url_param('configfile') ne "" ) {
push @ARGV, '-f', $query->url_param('configfile');
}
@@ -76,4 +68,5 @@ if ( $query->url_param('servport') ne "" ) {
}
# Now the real work
+print "Content-Type: text/html\n\n";
require "@bindir(a)/repl-monitor.pl";