From c911bc36742024688e238136ed23492b8dc858dd Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Thu, 2 Jun 2011 22:54:15 +0200 Subject: updated Makefile the Makefile will reconfigure the original config files and add shack user --- Monitoring/Makefile | 17 +++++++++++++---- 1 file 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 -- cgit v1.2.3