diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/irc_bot.pp | 15 | ||||
-rw-r--r-- | manifests/irc_bot/disabled.pp | 1 |
2 files changed, 4 insertions, 12 deletions
diff --git a/manifests/irc_bot.pp b/manifests/irc_bot.pp index 04bed58..494f0c3 100644 --- a/manifests/irc_bot.pp +++ b/manifests/irc_bot.pp @@ -57,7 +57,9 @@ class nagios::irc_bot { service { "nagios-nsa": ensure => "running", hasstatus => true, + enable => true, require => [File["/etc/nagios_nsa.cfg"], + File["/etc/init.d/nagios-nsa"], Package["libnet-irc-perl"], Service['nagios'] ], } @@ -65,18 +67,7 @@ class nagios::irc_bot { case $operatingsystem { centos: { Package['libnet-irc-perl']{ - name => 'perl-Net-IRC', - } - Service['nagios-nsa']{ - enable => true, - } - } - debian,ubuntu: { - exec { "nagios_nsa_init_script": - command => "/usr/sbin/update-rc.d nagios-nsa defaults", - unless => "/bin/ls /etc/rc3.d/ | /bin/grep nagios-nsa", - require => File["/etc/init.d/nagios-nsa"], - before => Service['nagios-nsa'], + name => 'perl-Net-IRC', } } } diff --git a/manifests/irc_bot/disabled.pp b/manifests/irc_bot/disabled.pp index 812ef94..83ff15a 100644 --- a/manifests/irc_bot/disabled.pp +++ b/manifests/irc_bot/disabled.pp @@ -1,5 +1,6 @@ class nagios::irc_bot::disabled inherits nagios::irc_bot { Service['nagios-nsa'] { ensure => stopped, + enable => false, } } |