Changeset 258


Ignore:
Timestamp:
Jun 25, 2018, 9:43:57 PM (2 years ago)
Author:
g7moreau
Message:
  • Small error on cgi path
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nagios-velvice/velvice.cgi

    r257 r258  
    1515use strict;
    1616use warnings;
    17 use version; our $VERSION = version->declare('0.6.2');
     17use version; our $VERSION = version->declare('0.6.3');
    1818
    1919use CGI;
     
    2727my $cgi_check       = uri_decode($query->param('check'));
    2828my $cgi_script_name = $query->script_name();
    29 my $cgi_uri         = $query->request_uri();
     29my $cgi_path        = $cgi_script_name =~ s{/$cgi_script_name$}{}r;
    3030
    3131my $config = {};
     
    3434$config->{'nagios-server'}{'status-file'} ||= '/var/cache/nagios3/status.dat';
    3535$config->{'nagios-server'}{'nagios-cmd'}  ||= '/var/lib/nagios3/rw/nagios.cmd';
    36 $config->{'nagios-server'}{'portal-url'}  ||= $cgi_uri =~ s{/cgi-bin/}{/}r;
    37 $config->{'nagios-server'}{'status-cgi'}  ||= "$cgi_uri/status.cgi";
     36$config->{'nagios-server'}{'portal-url'}  ||= $cgi_path =~ s{/cgi-bin/}{/}r;
     37$config->{'nagios-server'}{'status-cgi'}  ||= "$cgi_path/status.cgi";
    3838$config->{'host-mapping'}                 ||= {};
    3939$config->{'color-downtime'}               ||= {};
Note: See TracChangeset for help on using the changeset viewer.