From 45d43ad3f6269c0d9ed3e7725e179b8e00d35682 Mon Sep 17 00:00:00 2001 From: Hervé Date: Fri, 12 Aug 2016 14:59:59 +0200 Subject: End commandline with a newline Due to a [recent change](https://github.com/Icinga/icinga2/commit/0a6505ce2d778d46863345ad7b457cbe911a3176#diff-41f5f9b62fd89e63b82e66bbe76c0e73R121) in Icinga, commands passed through the external command listener are read by _readline_ so that's mean they have to be ended by a newline. --- bin/icli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/icli b/bin/icli index 6e2f95d..d3859df 100755 --- a/bin/icli +++ b/bin/icli @@ -1195,7 +1195,7 @@ sub display_overview { } sub dispatch_command { - my $str = join( ';', @_ ); + my $str = join( ';', @_ ) . "\n"; open( my $cmd_fh, '>', $rw_file ) or die( "Failed to open icinga command file ($rw_file): $!\n" -- cgit v1.2.3 From 453fa29e1d5283255cc2c3eb61feb139028a7f03 Mon Sep 17 00:00:00 2001 From: Stefan Seifert Date: Mon, 10 Apr 2017 18:55:50 +0200 Subject: Fix acknowledging outages The internal command name is lower cased like the other commands. Fixes "Cannot run action 'acknowledge'" errors. --- bin/icli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/icli b/bin/icli index 7435797..cac57b4 100755 --- a/bin/icli +++ b/bin/icli @@ -1291,7 +1291,7 @@ sub action_on_service { time() ); say "Scheduled forced check of '$service' on '$host'"; } - when ('Acknowledge') { + when ('acknowledge') { dispatch_command( 'ACKNOWLEDGE_SVC_PROBLEM', $host, $service, 2, 1, 1, 'cli', $action_args[0] ); say "Acknowledged $host/$service: $action_args[0]"; -- cgit v1.2.3 From 4787b700f309f04db7f087552d291ef400dcd7b3 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 18 Dec 2018 19:19:43 +0000 Subject: Added repo meta. --- Build.PL | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Build.PL b/Build.PL index 48a27ff..c931fc8 100644 --- a/Build.PL +++ b/Build.PL @@ -56,6 +56,11 @@ my $build = Module::Build->new( test_types => { author => '.at', }, + meta_merge => { + resources => { + repository => 'https://github.com/derf/icli' + } + }, ); print <<'EOF'; -- cgit v1.2.3 From ad031e04b0dde95ad9354ac6b6e87aee0d3be327 Mon Sep 17 00:00:00 2001 From: Evan Giles Date: Mon, 1 Jul 2019 10:11:22 +1200 Subject: Update t/00-compile.t to use OO interface ...because the functional interface is deprecated --- t/00-compile.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/00-compile.t b/t/00-compile.t index 31e3f3e..e430701 100755 --- a/t/00-compile.t +++ b/t/00-compile.t @@ -5,4 +5,6 @@ use 5.010; use Test::More; use Test::Compile; -all_pl_files_ok('bin/icli'); +my $test = Test::Compile->new(); +$test->all_files_ok('bin/icli'); +$test->done_testing(); -- cgit v1.2.3 From ff8b45613669da70c2a204213f5095c911aeccc6 Mon Sep 17 00:00:00 2001 From: Evan Giles Date: Tue, 2 Jul 2019 20:02:26 +1200 Subject: Update Build.PL so that App::Icli depends on version 1.3.0 of Test::Compile --- Build.PL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.PL b/Build.PL index c931fc8..e1b05d5 100644 --- a/Build.PL +++ b/Build.PL @@ -22,7 +22,7 @@ my @command_paths = ( my $build = Module::Build->new( build_requires => { 'Test::More' => 0, - 'Test::Compile' => 0, + 'Test::Compile' => "1.3.0", 'Test::Pod' => 0, 'Test::Command' => 0, }, -- cgit v1.2.3