diff options
-rw-r--r-- | net-analyzer/nagios-core/ChangeLog | 7 | ||||
-rw-r--r-- | net-analyzer/nagios-core/Manifest | 12 | ||||
-rw-r--r-- | net-analyzer/nagios-core/files/nagios | 24 |
3 files changed, 35 insertions, 8 deletions
diff --git a/net-analyzer/nagios-core/ChangeLog b/net-analyzer/nagios-core/ChangeLog index 1ddde96663b0..2b5ed34385e1 100644 --- a/net-analyzer/nagios-core/ChangeLog +++ b/net-analyzer/nagios-core/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/nagios-core # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.39 2004/08/20 13:38:13 eldad Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.40 2004/10/20 16:37:55 eldad Exp $ + + 20 Oct 2004; Eldad Zack <eldad@gentoo.org> files/nagios: + Added reload function to init.d script, based on a suggestion by Jason Frank + <jfrank@kc.rr.com>. Fixed init.d script to check the configuration before + start/restart/reload. Closes bug #67955. *nagios-core-1.2-r3 (20 Aug 2004) diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest index cf947f35b8ad..5e446660f79c 100644 --- a/net-analyzer/nagios-core/Manifest +++ b/net-analyzer/nagios-core/Manifest @@ -3,13 +3,13 @@ Hash: SHA1 MD5 ba3d132a9c25c4a0002451a2516842e3 nagios-core-1.2-r3.ebuild 7124 MD5 29d3ad573066390a78e460299c042bda nagios-core-1.2-r2.ebuild 6641 -MD5 0137ba795ed9717b55d206767cd5f39f ChangeLog 6841 +MD5 8fdda06a26d5317d5a390c1cf0f51129 ChangeLog 7099 MD5 a1ece421fae3536d1e5dd9b5ecb0215d metadata.xml 928 MD5 8e2eaa206717b94fb41508c7ab17a135 nagios-core-1.2-r1.ebuild 6669 MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362 MD5 565ce2a690d50aeb542e7afe44b8c733 files/Makefile-distclean.diff.bz2 1133 MD5 f2947dec6b9a839da79606bcc394036b files/conf.d 409 -MD5 00bd7731c70a158315e70338cee561a4 files/nagios 916 +MD5 e3466b42fdda5db64dc469a93f5c39e4 files/nagios 1395 MD5 673bda0ac6ab9230d23331e7f3846b7b files/99_nagios.conf 350 MD5 faad55511f21831997f9150547aa4e7d files/nagios.cfg-sample.gz 7224 MD5 f4f0b07e1a52477f83cbb9158db70391 files/tac.cgi.diff.bz2 204 @@ -18,9 +18,9 @@ MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r1 63 MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r2 63 MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r3 63 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.4 (GNU/Linux) +Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFBJf9OT+MN7JbqCpMRAgYqAJ9HphKRWLPIiS7EN5iArwsDk7UEuwCfRj9g -pjDYQLgnVZN7VHFn0hBG0Vw= -=JbNu +iD8DBQFBdpRnT+MN7JbqCpMRAlueAJ0faGqy96nJ2aZFczNH6IJLbIsybQCfYryB +BdyoEf1FcYqhZ8D/hhHk+Xo= +=PLQt -----END PGP SIGNATURE----- diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios index fd8c0aa2b0d0..20930037cab3 100644 --- a/net-analyzer/nagios-core/files/nagios +++ b/net-analyzer/nagios-core/files/nagios @@ -1,14 +1,34 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.5 2004/07/14 23:04:37 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.6 2004/10/20 16:37:55 eldad Exp $ + +opts="${opts} reload checkconfig" depend() { need net use dns logger } +reload() +{ + checkconfig || return 1 + ebegin "Reloading configuration" + killall -HUP nagios &>/dev/null + eend $? +} + +checkconfig() { + # Silent Check + /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0 + + # Now we know there's problem - run again and display errors + /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg + eend $? "Configuration Error. Please fix your configfile" +} + start() { + checkconfig || return 1 ebegin "Starting nagios" touch /var/nagios/nagios.log /var/nagios/status.sav chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav @@ -26,8 +46,10 @@ stop() { } svc_restart() { + checkconfig || return 1 ebegin "Restarting nagios" svc_stop svc_start eend $? } + |