diff options
author | Felix Richter <Felix.Richter@syntax-fehler.de> | 2011-06-02 22:54:15 +0200 |
---|---|---|
committer | Felix Richter <Felix.Richter@syntax-fehler.de> | 2011-06-02 22:54:15 +0200 |
commit | 5ff862e21c0c9930bd6078a5514e504277cc9a94 (patch) | |
tree | 90bb4be23f2c130c9a6879395b864112c4d62296 | |
parent | 8906f8901b8b4332d87d1afc76d94b4b674ed7ba (diff) |
updated Makefile
the Makefile will reconfigure the original config files and add shack user
-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 |