# # NagCollect -- Nagios Data Collector for Passive Checks # Copyright (c)2009 Alexander Barton, alex@barton.de # all: install: @echo " ** Use make targets 'install-client', 'install-server' and 'install-all'" @echo " ** to install client and/or server components!" install-all: install-server install-client install-server: install -d -o nagios -g nagios -m 750 /var/lib/nagios3/collect [ -r /etc/nagios3/system.cfg ] || \ install -D -o nagios -g root -m 640 -p \ server/etc/system.cfg /etc/nagios3/system.cfg [ -r /etc/nagios3/nagcollect.keys ] || \ install -D -o nagios -g www-data -m 640 -p \ server/etc/nagcollect.keys /etc/nagios3/nagcollect.keys install -D -o root -g root -m 755 -p \ server/bin/nagios-submit-host /usr/local/sbin/nagios-submit-host install -D -o root -g root -m 755 -p \ server/bin/nagios-submit-service /usr/local/sbin/nagios-submit-service install -D -o root -g root -m 644 -p \ server/web/nagcollect.php /var/www/nagcollect.php install-client: install -d -o 0 -g 0 -m 755 /usr/local/sbin install -c -o 0 -g 0 -m 755 -p \ client/bin/nagcollect /usr/local/sbin/nagcollect install -d -o 0 -g 0 -m 755 /usr/local/etc [ -r /usr/local/etc/nagcollect.conf ] || \ install -o 0 -g 0 -m 600 -p \ client/etc/nagcollect.conf /usr/local/etc/nagcollect.conf install -d -o 0 -g 0 -m 755 /usr/local/lib/nagcollect (cd client/lib/tests; find . -name '*.tst' | \ while read x; do \ install -d -o 0 -g 0 -m 755 `dirname "/usr/local/lib/nagcollect/$$x"`; \ install -o 0 -g 0 -m 644 "$$x" "/usr/local/lib/nagcollect/$$x"; \ done \ ) nagcollecttestscripts: tar -czvf nagcollecttestscripts.tgz -C client/lib/tests . .PHONY: all install install-all install-server install-client \ nagcollecttestscripts # -eof-