@echo " - This installs and configures permissions on the"
@echo " directory for holding the external command file"
@echo ""
@echo " make install-config"
@echo " - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
@echo " You'll have to modify these sample files before you can"
@echo " use Nagios. Read the HTML documentation for more info"
@echo " on doing this. Pay particular attention to the docs on"
@echo " object configuration files, as they determine what/how"
@echo " things get monitored!"
@echo ""
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
$(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg $(DESTDIR)$(CFGDIR)/nagios.cfg-sample
$(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg-sample
$(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg-sample
$(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/localhost.cfg-sample
$(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/commands.cfg-sample
@echo ""
@echo "*** Sample config file installed ***"
@echo ""
@echo "Remember, these are *SAMPLE* config files. You'll need to read"
@echo "the documentation for more information on how to actually define"
@echo "services, hosts, etc. to fit your particular needs."
@echo ""
@echo "If you have questions about configuring Nagios properly, please:"
@echo " - Look at the sample config files"
@echo " - Read the HTML documentation"
@echo " - Read the FAQs online at http://www.nagios.org/faqs"
@echo "*BEFORE* you post a question to one of the mailing lists."
@echo ""
install-init: install-daemoninit
install-daemoninit:
$(INSTALL) -m 755 -d $(INIT_OPTS) $(DESTDIR)$(INIT_DIR)
$(INSTALL) -m 774 $(INIT_OPTS) daemon-init $(DESTDIR)$(INIT_DIR)/nagios
@echo ""
@echo "*** Init script installed ***"
@echo ""
@echo "You can continue with installing Nagios as follows (type 'make'"
@echo "without any arguments for a list of all possible options):"
@echo ""
@echo " make install-commandmode"
@echo " - This installs and configures permissions on the"
@echo " directory for holding the external command file"
@echo ""
@echo " make install-config"
@echo " - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
@echo " You'll have to modify these sample files before you can"
@echo " use Nagios. Read the HTML documentation for more info"
@echo " on doing this. Pay particular attention to the docs on"
@echo " object configuration files, as they determine what/how"
@echo " things get monitored!"
@echo ""
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
chmod g+s $(DESTDIR)$(LOGDIR)/rw
@echo ""
@echo "*** External command directory configured ***"
@echo ""
@echo "You can continue with installing Nagios as follows (type 'make'"
@echo "without any arguments for a list of all possible options):"
@echo ""
@echo " make install-config"
@echo " - This installs *SAMPLE* config files in $(DESTDIR)$(CFGDIR)"
@echo " You'll have to modify these sample files before you can"
@echo " use Nagios. Read the HTML documentation for more info"
@echo " on doing this. Pay particular attention to the docs on"
@echo " object configuration files, as they determine what/how"
@echo " things get monitored!"
@echo ""
fullinstall: install install-init install-commandmode
# Uninstall is too destructive if base install directory is /usr, etc.
#uninstall:
# rm -rf $(DESTDIR)$(BINDIR)/nagios $(DESTDIR)$(CGIDIR)/*.cgi $(DESTDIR)$(CFGDIR)/*.cfg $(DESTDIR)$(HTMLDIR)
#
# Targets for creating packages on various architectures
#
# Solaris pkgmk
PACKDIR=/home/gutenberg/Technical/Code_Examples/C/nagios-2.9/pkg
VERSION=2.9
Prototype:
if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
if [ ! -d $(PACKDIR)/etc ] ; then mkdir $(PACKDIR)/etc; fi
if [ ! -d $(PACKDIR)/etc/init.d ] ; then mkdir $(PACKDIR)/etc/init.d; fi
if [ ! -d $(PACKDIR)/etc/nagios ] ; then mkdir $(PACKDIR)/etc/nagios; fi
$(MAKE) all
$(MAKE) DESTDIR=$(PACKDIR) INIT_OPTS='' INSTALL_OPTS='' COMMAND_OPTS='' nagios_grp='' nagios_usr='' fullinstall
=3= |