diff options
Diffstat (limited to 'Monitoring/Makefile')
-rw-r--r-- | Monitoring/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Monitoring/Makefile b/Monitoring/Makefile index cc1d8903..74cdedac 100644 --- a/Monitoring/Makefile +++ b/Monitoring/Makefile @@ -1,8 +1,17 @@ +NAGDIR = /etc/nagios3/ +NAGLIBDIR = /usr/lib/nagios +HTDOCS = /usr/share/nagios3/htdocs + .phony: debian debian: [ `which nagios3` ] || apt-get install nagios3 - rm /etc/nagios3/conf.d/localhost_nagios2.cfg || true - cp -r conf/* /etc/nagios3/conf.d/ - cp -R htdocs/* /usr/share/nagios3/htdocs/ - cp -r plugins /usr/lib/nagios + rm $(NAGDIR)/conf.d/localhost_nagios2.cfg || true + rm $(NAGDIR)/conf.d/host-gateway_nagios3.cfg || true + cp -r conf/* $(NAGDIR)/conf.d/ + htpasswd -bc htpasswd.users nagiosadmin krebs + htpasswd -b htpasswd.users shack shackit + sed -i 's/\(authorized_for_all_hosts=nagiosadmin$\)/\1,shack/ + sed -i 's/\(authorized_for_all_services=nagiosadmin$\)/\1,shack/ + cp -R htdocs/* $(HTDOCS) + cp -r plugins $(NAGLIBDIR) /etc/init.d/nagios3 reload |