From e3ce3a77fccdd9377b0e3023f1f38ef86201aa45 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 30 Sep 2013 17:40:20 +0200 Subject: allow build-time specification of icinga paths --- bin/icli | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'bin/icli') diff --git a/bin/icli b/bin/icli index 88a37df..07577b6 100755 --- a/bin/icli +++ b/bin/icli @@ -9,6 +9,7 @@ use 5.010; no if $] >= 5.018, warnings => "experimental::smartmatch"; +use App::Icli::ConfigData; use Carp qw(croak); use Getopt::Long qw/:config bundling/; use List::MoreUtils qw(any firstval); @@ -19,9 +20,9 @@ use Term::Size; our $VERSION = '0.46'; my ( $cache, $config, $data, $extra ); -my $config_file = '/var/cache/icinga/objects.cache'; -my $status_file = '/var/lib/icinga/status.dat'; -my $rw_file = '/var/lib/icinga/rw/icinga.cmd'; +my $config_file = App::Icli::ConfigData->config('object_file'); +my $status_file = App::Icli::ConfigData->config('status_file'); +my $rw_file = App::Icli::ConfigData->config('command_file'); my $context; my $colours = 1; my $list_type = 's'; @@ -1080,8 +1081,7 @@ Note: Acknowledgement of host problems is not yet supported. =item B<-c>|B<--config> I -Read config from I instead of the default -F +Read config from I =item B<-C>|B<--no-colours> @@ -1089,13 +1089,11 @@ Disable colours in output =item B<-f>|B<--status-file> I -Read the status from I instead of the default -F +Read the status from I =item B<-F>|B<--rw-file> I -Use I as external commands file. Default: -F +Use I as external commands file. =item B<-g>|B<--hostgroup> I -- cgit v1.2.3