summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2012-01-08 18:41:15 +0000
committerMatthew Thode <prometheanfire@gentoo.org>2012-01-08 18:41:15 +0000
commitefb928ac1da2257fb966de469360f569a6fc1ab0 (patch)
tree91fe073aa40ff484be6d71668b0498536ace417b /net-analyzer/icinga/files
parentAdd live ebuild (diff)
downloadgentoo-2-efb928ac1da2257fb966de469360f569a6fc1ab0.tar.gz
gentoo-2-efb928ac1da2257fb966de469360f569a6fc1ab0.tar.bz2
gentoo-2-efb928ac1da2257fb966de469360f569a6fc1ab0.zip
fixed init, reload was not working. readded checkconfig function to fix
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/icinga/files')
-rwxr-xr-xnet-analyzer/icinga/files/icinga-init.d-28
1 files changed, 8 insertions, 0 deletions
diff --git a/net-analyzer/icinga/files/icinga-init.d-2 b/net-analyzer/icinga/files/icinga-init.d-2
index 8f05cc7dcdce..683e52c4c4e5 100755
--- a/net-analyzer/icinga/files/icinga-init.d-2
+++ b/net-analyzer/icinga/files/icinga-init.d-2
@@ -8,6 +8,14 @@ depend() {
after mysql postgresql ido2db
}
+checkconfig() {
+ # Silent Check
+ /usr/sbin/icinga -v /etc/icinga/icinga.cfg &>/dev/null && return 0
+ # Now we know there's problem - run again and display errors
+ /usr/sbin/icinga -v /etc/icinga/icinga.cfg
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
reload()
{
checkconfig || return 1