summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Beaupre <anarcat@koumbit.org>2012-02-27 01:37:14 -0500
committerMicah Anderson <micah@riseup.net>2012-03-13 22:16:13 -0400
commitcf6462a91be41d325711d5ebdb910ff95202dac7 (patch)
tree971d94c9ffd480fb5d081aefd288c18676341a1d
parentf56b96b55ce609df4a950f203bf2635906741ed8 (diff)
add commandfile path to configuration
Conflicts: templates/irc_bot/nsa.cfg.erb
-rw-r--r--files/irc_bot/riseup-nagios-server.pl4
-rw-r--r--templates/irc_bot/nsa.cfg.erb11
2 files changed, 8 insertions, 7 deletions
diff --git a/files/irc_bot/riseup-nagios-server.pl b/files/irc_bot/riseup-nagios-server.pl
index 9fbc8c5..04e3054 100644
--- a/files/irc_bot/riseup-nagios-server.pl
+++ b/files/irc_bot/riseup-nagios-server.pl
@@ -165,8 +165,8 @@ sub parse_msg {
my $data = join(' ', $event->args);
my $msg;
if ($data =~ m/([^:]*:)?\s*ack(?:knowledge)?\s+([a-zA-Z0-9\-\.]+)(?:\s+(\w+)(?:\s+(\w+))?)?/) {
- print STDERR "writing to nagios scoket ". $CFG::Nsa{'nagios_socket'} . "\n";
- open(my $cmdfile, ">", $CFG::Nsa{'nagios_socket'}) || die "Can't open Nagios commandfile: $CFG::Nsa{'nagios_socket'}!\n";
+ print STDERR "writing to nagios scoket ". $CFG::Nsa{'commandfile'} . "\n";
+ open(my $cmdfile, ">", $CFG::Nsa{'commandfile'}) || die "Can't open Nagios commandfile: $CFG::Nsa{'commandfile'}!\n";
my $host = $2;
my ($service, $comment) = (undef, "");
if ($4) {
diff --git a/templates/irc_bot/nsa.cfg.erb b/templates/irc_bot/nsa.cfg.erb
index da6b2f0..41e6319 100644
--- a/templates/irc_bot/nsa.cfg.erb
+++ b/templates/irc_bot/nsa.cfg.erb
@@ -6,9 +6,10 @@
'password' => '<%= nagios_nsa_password %>',
# this needs libio-socket-ssl-perl
# doesn't actually works because Net::IRC is braindead and tries to use IO::Socket::SSL->read/write instead of the builtin print, see http://search.cpan.org/dist/IO-Socket-SSL/SSL.pm
- #'SSL' => 0,
- 'channel' => '<%= nagios_nsa_channel %>',
- 'pidfile' => '<%= nagios_nsa_pidfile %>', # set to undef to disable
- 'realname' => "<%= nagios_nsa_realname %>",
- 'usenotices' => "<%= nagios_nsa_usenotices %>",
+ #'SSL' => 0,
+ 'channel' => '<%= nagios_nsa_channel %>',
+ 'pidfile' => '<%= nagios_nsa_pidfile %>', # set to undef to disable
+ 'realname' => "<%= nagios_nsa_realname %>",
+ 'usenotices' => "<%= nagios_nsa_usenotices %>",
+ 'commandfile' => '/var/lib/nagios3/rw/nagios.cmd',
);