#!/bin/bash

#

VER_ROOT=nagios-4.x
VERSION=nagios-4.5.3
CURDIR=$(mktemp -d)

cd $CURDIR
wget  https://sourceforge.net/projects/nagios/files/${VER_ROOT}/${VERSION}/${VERSION}.tar.gz
tar xvf ${VERSION}.tar.gz
cd ${CURDIR}/${VERSION}
./configure
make all
#Let puppet create the users and group
##make install-groups-users
make install
make install-init
make install-commandmode
make install-webconf || true

#rm -rf $CURDIR

#clean:
#	cd ${CURDIR}/${VERSION}
#	make clean
	
