summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-06-02 22:54:15 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-06-02 22:54:15 +0200
commitc911bc36742024688e238136ed23492b8dc858dd (patch)
tree3c602d1573e5b257b56ee41a2b7e899c80db2e11
parent7448b089b883a365d122ae6fba4d15a44f6516c3 (diff)
updated Makefile
the Makefile will reconfigure the original config files and add shack user
-rw-r--r--Monitoring/Makefile17
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