summaryrefslogtreecommitdiff
path: root/bin/icli
diff options
context:
space:
mode:
Diffstat (limited to 'bin/icli')
-rwxr-xr-xbin/icli3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/icli b/bin/icli
index c5fd4ac..98729c2 100755
--- a/bin/icli
+++ b/bin/icli
@@ -7,6 +7,8 @@ use 5.010;
use Getopt::Long qw/:config bundling/;
use Term::ANSIColor;
+my $version = '0.0+git';
+
my ($cache, $config, $data, $extra);
my $config_file = '/var/cache/icinga/objects.cache';
my $status_file = '/var/lib/icinga/status.dat';
@@ -182,6 +184,7 @@ GetOptions(
'h|host=s' => sub { push(@for_hosts, split(/,/, $_[1])) },
'l|list=s' => sub { $list_type = substr($_[1], 0, 1) },
's|short' => \$short,
+ 'V|version' => sub { say "icli version $version"; exit 0 },
);
read_objects($status_file, \$data);