mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-01 23:28:08 -07:00
profiles: remove icinga and icinga-web
Closes: https://bugs.gentoo.org/709998 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
DIST icinga-web-1.14.1.tar.gz 14524043 BLAKE2B 0a3bdf9afc77b508dd3967e38050f6babfe01240f8cf8196158abe42818079b09a962513541298d0b0ac2b1497640d292cf1ef4feac24e302c0622f6ef0fafd8 SHA512 1ddb1fe128c2ceff20e232d61d84abebbe9578f2ef9bf0c408523c399ab6125dedc7d4e82981fff113aba8959a1ac02712032b4a36e5aa951850c084792a47bb
|
||||
@@ -1,205 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit depend.apache eutils user multilib
|
||||
|
||||
DESCRIPTION="Icinga Web - new Web Interface"
|
||||
HOMEPAGE="http://www.icinga.org/"
|
||||
SRC_URI="https://github.com/icinga/${PN}/archive/v${PV}/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="apache2 mysql pnp postgres"
|
||||
DEPEND="dev-php/phing
|
||||
dev-db/libdbi-drivers[mysql?,postgres?]
|
||||
|| ( >=net-analyzer/icinga-1.10.0 >=net-analyzer/icinga2-2.1.1 )
|
||||
dev-lang/php:=[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
|
||||
pnp? ( net-analyzer/pnp4nagios )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
want_apache2
|
||||
|
||||
pkg_setup() {
|
||||
if use apache2 ; then
|
||||
depend.apache_pkg_setup
|
||||
fi
|
||||
enewgroup icinga
|
||||
enewgroup nagios
|
||||
enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
#removed checks for some php stuff since we have these things called use flags
|
||||
sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
|
||||
sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
|
||||
autoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
myconf="--prefix=/usr/share/icinga/icinga-web
|
||||
--bindir=/usr/sbin
|
||||
--sbindir=/usr/$(get_libdir)/icinga/cgi-bin
|
||||
--datarootdir=/usr/share/icinga/htdocs
|
||||
--localstatedir=/var/lib/icinga
|
||||
--sysconfdir=/etc/icinga
|
||||
--libexecdir=/usr/$(get_libdir)/icinga/plugins
|
||||
--with-bin-user=icinga
|
||||
--with-bin-group=nagios
|
||||
--with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
|
||||
--with-conf-dir=/etc/icinga-web
|
||||
--with-log-dir=/var/log/icinga-web
|
||||
--with-icinga-objects-dir=/etc/icinga/objects
|
||||
--with-icinga-bin=/usr/sbin/icinga
|
||||
--with-icinga-cfg=/etc/icinga/icinga.cfg"
|
||||
|
||||
if use apache2 ; then
|
||||
myconf+=" --with-web-user=apache
|
||||
--with-web-group=apache
|
||||
--with-web-apache-path=${APACHE_MODULES_CONFDIR}"
|
||||
else
|
||||
myconf+=" --with-web-user=root
|
||||
--with-web-group=root"
|
||||
fi
|
||||
|
||||
if use postgres ; then
|
||||
myconf+=" --with-db-type=pgsql
|
||||
--with-db-port=5432
|
||||
--with-api-subtype=pgsql
|
||||
--with-api-port=5432"
|
||||
fi
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc README
|
||||
rm -f README
|
||||
|
||||
emake -j1 DESTDIR="${D}" install
|
||||
|
||||
emake DESTDIR="${D}" install-javascript
|
||||
|
||||
if use apache2 ; then
|
||||
dodir ${APACHE_MODULES_CONFDIR}
|
||||
emake DESTDIR="${D}" install-apache-config
|
||||
echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
|
||||
cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
|
||||
rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed"
|
||||
echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
|
||||
fi
|
||||
|
||||
insinto /usr/share/icinga/icinga-web/contrib
|
||||
doins -r etc/schema/*
|
||||
|
||||
if use apache2 ; then
|
||||
sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
|
||||
else
|
||||
sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
|
||||
fi
|
||||
sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
|
||||
|
||||
dodir /usr/share/icinga/icinga-web/cron/
|
||||
cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
|
||||
# Force the shell to bash
|
||||
SHELL=/bin/bash
|
||||
#mail to root
|
||||
MAILTO=root
|
||||
|
||||
#runs every minute
|
||||
* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
|
||||
EOF
|
||||
|
||||
cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
|
||||
# Mail reports to root
|
||||
!mailto(root)
|
||||
|
||||
#runs every minute
|
||||
@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
|
||||
EOF
|
||||
|
||||
if use apache2 ; then
|
||||
diropts -o apache -g apache
|
||||
else
|
||||
diropts -o root -g root
|
||||
fi
|
||||
dodir /var/log/icinga-web
|
||||
|
||||
if use apache2 ; then
|
||||
fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
|
||||
else
|
||||
fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
|
||||
fi
|
||||
|
||||
if use pnp ; then
|
||||
insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
|
||||
doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
|
||||
doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "press enter to install the icinga-web crontab"
|
||||
einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
|
||||
einfo
|
||||
read
|
||||
|
||||
if has_version sys-process/fcron; then
|
||||
fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
|
||||
else
|
||||
crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo
|
||||
einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
|
||||
einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
|
||||
einfo
|
||||
einfo "Additionally, you need to setup a database user."
|
||||
einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
|
||||
einfo
|
||||
einfo "Example for a MySQL database:"
|
||||
einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
|
||||
einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
|
||||
einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
|
||||
einfo
|
||||
einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
|
||||
einfo
|
||||
|
||||
ewarn
|
||||
ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
|
||||
ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
|
||||
ewarn
|
||||
ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
|
||||
ewarn " be advised that you need to apply those upgrade files with incremental steps!"
|
||||
ewarn
|
||||
ewarn "Example to upgrade a MySQL database:"
|
||||
ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
|
||||
ewarn
|
||||
ewarn "Don't forget to clear the config cache."
|
||||
ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
|
||||
ewarn
|
||||
|
||||
einfo
|
||||
einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
|
||||
einfo
|
||||
|
||||
if use apache2 ; then
|
||||
einfo
|
||||
einfo "apache config was installed into"
|
||||
einfo "/etc/apache2/modules.d/99_icinga-web.conf"
|
||||
einfo
|
||||
einfo "The apache config value for \'ServerTokens\' must be set to at"
|
||||
einfo "least \'Min\'."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
einfo "If you are not using apache you may need to change some"
|
||||
einfo "permissions, so that your web server can access files and logs"
|
||||
einfo
|
||||
fi
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>prometheanfire@gentoo.org</email>
|
||||
<name>Matthew Thode</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
Icinga-web is a database backed web frontend to icinga.
|
||||
</longdescription>
|
||||
<use>
|
||||
<flag name="pnp">Enables pnp4nagios integration</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">icinga</remote-id>
|
||||
<remote-id type="github">icinga/icinga-web</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -1 +0,0 @@
|
||||
DIST icinga-1.14.2.tar.gz 20779284 BLAKE2B ffc5ab7195faa64b01ae2f37385590405a5525b5ba0cb357bbdc24eb61c1590d25f299d706debb1af1026215dd3800c5133a5fe81cbce8708e0f7ee761a584e2 SHA512 9e993d9653497a5942ad6c3d1ef50b5da4153ba2c7a747aa094c2628f36b687033588b629ca21f8955c84fc6a15f7a7d8169f8b8677f36939bab76cc5e398e41
|
||||
@@ -1,17 +0,0 @@
|
||||
<IfDefine ICINGA>
|
||||
ScriptAlias /icinga/cgi-bin/ /usr/lib/icinga/cgi-bin/
|
||||
<Directory "/usr/lib/icinga/cgi-bin/">
|
||||
Options ExecCGI
|
||||
AuthName "Icinga Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/icinga/htpasswd.users
|
||||
Require valid-user
|
||||
</Directory>
|
||||
Alias /icinga /usr/share/icinga/htdocs
|
||||
<Directory "/usr/share/icinga/htdocs">
|
||||
AuthName "Icinga Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/icinga/htpasswd.users
|
||||
Require valid-user
|
||||
</Directory>
|
||||
</IfDefine>
|
||||
@@ -1,3 +0,0 @@
|
||||
# Distributed monitoring users will want to configure here the ip/hostname of the central server.
|
||||
# It will be used by submit_check_result_via_nsca.
|
||||
NAGIOS_NSCA_HOST="localhost"
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
: ${ICINGACFG:=/etc/icinga/icinga.cfg}
|
||||
|
||||
extra_commands="checkconfig"
|
||||
extra_started_commands="reload"
|
||||
|
||||
command=/usr/sbin/icinga
|
||||
command_args="-d ${ICINGACFG}"
|
||||
|
||||
get_config() {
|
||||
if [ -e "${ICINGACFG}" ]; then
|
||||
sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${ICINGACFG}"
|
||||
fi
|
||||
}
|
||||
|
||||
pidfile=$(get_config lock_file)
|
||||
start_stop_daemon_args="-e HOME=/var/lib/icinga"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use dns logger firewall mysql postgresql
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
# Silent Check
|
||||
${command} -v ${ICINGACFG} &>/dev/null && return 0
|
||||
# Now we know there's problem - run again and display errors
|
||||
${command} -v ${ICINGACFG}
|
||||
eend $? "Configuration Error. Please fix your configfile"
|
||||
}
|
||||
|
||||
reload()
|
||||
{
|
||||
checkconfig || return 1
|
||||
ebegin "Reloading configuration"
|
||||
kill -HUP $(cat ${pidfile}) &>/dev/null
|
||||
eend $?
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o icinga:icinga $(dirname $(get_config lock_file)) $(dirname $(get_config log_file)) $(dirname $(get_config status_file))
|
||||
checkpath -f -o icinga:icinga $(get_config log_file)
|
||||
rm -f $(get_config command_file)
|
||||
# Temp dir must NOT be group-writable
|
||||
# grsec: denied untrusted exec (due to file in group-writable directory)
|
||||
checkpath -d -o icinga:icinga -m 0750 $(get_config temp_path)
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
rm -f $(get_config command_file)
|
||||
rm -r /tmp/icinga
|
||||
}
|
||||
|
||||
svc_restart() {
|
||||
checkconfig || return 1
|
||||
ebegin "Restarting icinga"
|
||||
svc_stop
|
||||
svc_start
|
||||
eend $?
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
server.modules += ("mod_cgi")
|
||||
server.modules += ("mod_auth")
|
||||
server.modules += ("mod_alias")
|
||||
|
||||
auth.require += ( "/icinga" =>
|
||||
(
|
||||
"method" => "digest",
|
||||
"realm" => "icinga",
|
||||
"require" => "valid-user"
|
||||
)
|
||||
)
|
||||
|
||||
$HTTP["url"] =~ "^/icinga/cgi-bin/" {
|
||||
dir-listing.activate = "disable"
|
||||
cgi.assign = (
|
||||
".pl" => "/usr/bin/perl",
|
||||
".cgi" => ""
|
||||
)
|
||||
}
|
||||
|
||||
alias.url += (
|
||||
"/icinga/cgi-bin" => "/usr/lib/icinga/cgi-bin",
|
||||
"/icinga" => "/usr/share/icinga/htdocs"
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
IDO2DBCFG="/etc/icinga/ido2db.cfg"
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
get_config() {
|
||||
if [ -e "${IDO2DBCFG}" ]; then
|
||||
sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${IDO2DBCFG}"
|
||||
fi
|
||||
}
|
||||
|
||||
command=/usr/sbin/ido2db
|
||||
command_args="-c ${IDO2DBCFG}"
|
||||
pidfile="$(get_config lock_file)"
|
||||
|
||||
depend() {
|
||||
config "${IDO2DBCFG}"
|
||||
|
||||
need net icinga
|
||||
use dns logger firewall
|
||||
|
||||
case $(get_config db_servertype) in
|
||||
mysql)
|
||||
use mysql ;;
|
||||
pgsql)
|
||||
use postgresql ;;
|
||||
esac
|
||||
}
|
||||
|
||||
IDO2DBSOCKET="$(get_config socket_name)"
|
||||
|
||||
|
||||
start_pre() {
|
||||
if [ -S "${IDO2DBSOCKET}" ] ; then
|
||||
ewarn "Strange, the socket file already exist in \"${IDO2DBSOCKET}\""
|
||||
ewarn "it will be removed now and re-created by ido2db"
|
||||
ewarn "BUT please make your checks."
|
||||
rm -f "${IDO2DBSOCKET}"
|
||||
fi
|
||||
}
|
||||
@@ -1,265 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
|
||||
|
||||
DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
|
||||
HOMEPAGE="http://www.icinga.org/"
|
||||
SRC_URI="https://github.com/${PN}/${PN}-core/archive/v${PV}/${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-core-${PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm ~hppa ppc ppc64 x86"
|
||||
IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
|
||||
DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
|
||||
perl? ( dev-lang/perl:= )
|
||||
virtual/mailx
|
||||
web? (
|
||||
media-libs/gd[jpeg,png]
|
||||
lighttpd? ( www-servers/lighttpd )
|
||||
)
|
||||
!net-analyzer/nagios-core"
|
||||
RDEPEND="${DEPEND}
|
||||
plugins? ( || (
|
||||
net-analyzer/monitoring-plugins
|
||||
net-analyzer/nagios-plugins
|
||||
) )"
|
||||
RESTRICT="test"
|
||||
|
||||
want_apache2
|
||||
|
||||
pkg_setup() {
|
||||
depend.apache_pkg_setup
|
||||
enewgroup icinga
|
||||
enewgroup nagios
|
||||
enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
myconf="$(use_enable perl embedded-perl)
|
||||
$(use_with perl perlcache)
|
||||
$(use_enable idoutils)
|
||||
$(use_enable ssl)
|
||||
--with-cgiurl=/icinga/cgi-bin
|
||||
--with-log-dir=/var/log/icinga
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--bindir=/usr/sbin
|
||||
--sbindir=/usr/$(get_libdir)/icinga/cgi-bin
|
||||
--datarootdir=/usr/share/icinga/htdocs
|
||||
--localstatedir=/var/lib/icinga
|
||||
--sysconfdir=/etc/icinga
|
||||
--with-lockfile=/var/run/icinga/icinga.lock
|
||||
--with-temp-dir=/tmp/icinga
|
||||
--with-temp-file=/tmp/icinga/icinga.tmp"
|
||||
|
||||
if use idoutils ; then
|
||||
myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
|
||||
--with-icinga-chkfile=/var/lib/icinga/icinga.chk
|
||||
--with-ido-sockfile=/var/lib/icinga/ido.sock
|
||||
--with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
|
||||
fi
|
||||
|
||||
if use eventhandler ; then
|
||||
myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
|
||||
fi
|
||||
|
||||
if use plugins ; then
|
||||
myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
|
||||
else
|
||||
myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
|
||||
fi
|
||||
|
||||
if use !apache2 && use !lighttpd ; then
|
||||
myconf+=" --with-command-group=icinga"
|
||||
else
|
||||
if use apache2 ; then
|
||||
myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
|
||||
myconf+=" --with-command-group=apache"
|
||||
elif use lighttpd ; then
|
||||
myconf+=" --with-command-group=lighttpd"
|
||||
fi
|
||||
fi
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
|
||||
emake icinga
|
||||
|
||||
if use web ; then
|
||||
emake DESTDIR="${D}" cgis
|
||||
fi
|
||||
|
||||
if use contrib ; then
|
||||
emake DESTDIR="${D}" -C contrib
|
||||
fi
|
||||
|
||||
if use idoutils ; then
|
||||
emake DESTDIR="${D}" idoutils
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc Changelog README UPGRADING
|
||||
|
||||
if ! use web ; then
|
||||
sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile
|
||||
fi
|
||||
|
||||
emake DESTDIR="${D}" install{,-config,-commandmode}
|
||||
|
||||
if use idoutils ; then
|
||||
emake DESTDIR="${D}" install-idoutils
|
||||
fi
|
||||
|
||||
if use contrib ; then
|
||||
emake DESTDIR="${D}" -C contrib install
|
||||
fi
|
||||
|
||||
if use eventhandler ; then
|
||||
emake DESTDIR="${D}" install-eventhandlers
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/icinga-init.d icinga
|
||||
newconfd "${FILESDIR}"/icinga-conf.d icinga
|
||||
if use idoutils ; then
|
||||
newinitd "${FILESDIR}"/ido2db-init.d ido2db
|
||||
newconfd "${FILESDIR}"/ido2db-conf.d ido2db
|
||||
insinto /usr/share/icinga/contrib/db
|
||||
doins -r module/idoutils/db/*
|
||||
fi
|
||||
# Apache Module
|
||||
if use web ; then
|
||||
if use apache2 ; then
|
||||
insinto "${APACHE_MODULES_CONFDIR}"
|
||||
newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf
|
||||
elif use lighttpd ; then
|
||||
insinto /etc/lighttpd
|
||||
newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf
|
||||
else
|
||||
ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
|
||||
ewarn "out-of-the-box. Since you are not using one of them, you"
|
||||
ewarn "have to configure your webserver accordingly yourself."
|
||||
fi
|
||||
fowners -R root:root /usr/$(get_libdir)/icinga
|
||||
cd "${D}"
|
||||
find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
|
||||
find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
|
||||
fi
|
||||
|
||||
if use eventhandler ; then
|
||||
dodir /etc/icinga/eventhandlers
|
||||
# fowners icinga:icinga /etc/icinga/eventhandlers
|
||||
fi
|
||||
|
||||
keepdir /etc/icinga
|
||||
keepdir /var/lib/icinga
|
||||
keepdir /var/lib/icinga/archives
|
||||
keepdir /var/lib/icinga/rw
|
||||
keepdir /var/lib/icinga/spool/checkresults
|
||||
|
||||
if use apache2 ; then
|
||||
webserver=apache
|
||||
elif use lighttpd ; then
|
||||
webserver=lighttpd
|
||||
else
|
||||
webserver=icinga
|
||||
fi
|
||||
|
||||
fowners icinga:icinga /var/lib/icinga
|
||||
fowners -R icinga:${webserver} /var/lib/icinga/rw
|
||||
|
||||
fperms 6755 /var/lib/icinga/rw
|
||||
|
||||
# ensure ownership
|
||||
fowners -R root:root /etc/icinga
|
||||
fperms 0750 /etc/icinga
|
||||
fowners -R root:root /usr/sbin
|
||||
fowners -R root:root /usr/$(get_libdir)
|
||||
fowners -R root:root /usr/share/icinga/htdocs
|
||||
|
||||
# paxmarks
|
||||
if use idoutils ; then
|
||||
pax-mark m usr/sbin/ido2db
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use web ; then
|
||||
elog "This does not include cgis that are perl-dependent"
|
||||
elog "Currently traceroute.cgi is perl-dependent"
|
||||
elog "Note that the user your webserver is running as needs"
|
||||
elog "read-access to /etc/icinga."
|
||||
elog
|
||||
if use apache2 || use lighttpd ; then
|
||||
elog "There are several possible solutions to accomplish this,"
|
||||
elog "choose the one you are most comfortable with:"
|
||||
elog
|
||||
if use apache2 ; then
|
||||
elog " usermod -G icinga apache"
|
||||
elog "or"
|
||||
elog " chown icinga:apache /etc/icinga"
|
||||
elog
|
||||
elog "Also edit /etc/conf.d/apache2 and add a line like"
|
||||
elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
|
||||
elog
|
||||
elog "Icinga web service needs user authentication. If you"
|
||||
elog "use the base configuration, you need a password file"
|
||||
elog "with a password for user \"icingaadmin\""
|
||||
elog "You can create this file by executing:"
|
||||
elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
|
||||
elog
|
||||
elog "you may want to also add apache to the icinga group"
|
||||
elog "to allow it access to the AuthUserFile"
|
||||
elog
|
||||
elif use lighttpd ; then
|
||||
elog " usermod -G icinga lighttpd "
|
||||
elog "or"
|
||||
elog " chown icinga:lighttpd /etc/icinga"
|
||||
elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
|
||||
fi
|
||||
elog
|
||||
elog "That will make icinga's web front end visable via"
|
||||
elog "http://localhost/icinga/"
|
||||
elog
|
||||
else
|
||||
elog "IMPORTANT: Do not forget to add the user your webserver"
|
||||
elog "is running as to the icinga group!"
|
||||
fi
|
||||
else
|
||||
ewarn "Please note that you have installed Icinga without web interface."
|
||||
ewarn "Please don't file any bugs about having no web interface when you do this."
|
||||
ewarn "Thank you!"
|
||||
fi
|
||||
elog
|
||||
elog "If you want icinga to start at boot time"
|
||||
elog "remember to execute:"
|
||||
elog " rc-update add icinga default"
|
||||
elog
|
||||
elog "If your kernel has /proc protection, icinga"
|
||||
elog "will not be happy as it relies on accessing the proc"
|
||||
elog "filesystem. You can fix this by adding icinga into"
|
||||
elog "the group wheel, but this is not recomended."
|
||||
elog
|
||||
if [ -d "${ROOT}"/var/icinga ] ; then
|
||||
ewarn
|
||||
ewarn "/var/icinga was moved to /var/lib/icinga"
|
||||
ewarn "please move the files if this was an upgrade"
|
||||
if use idoutils ; then
|
||||
ewarn "and edit /etc/ido2db.cfg to change the location of the files"
|
||||
ewarn "it accesses"
|
||||
ewarn "update your db with the scripts under the directory"
|
||||
ewarn "/usr/share/icinga/contrib/db/"
|
||||
fi
|
||||
ewarn
|
||||
ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
|
||||
ewarn "remove /var/icinga afterwards to make this warning disappear"
|
||||
fi
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<longdescription lang="en">A rebuild of nagios from the ground up</longdescription>
|
||||
<use>
|
||||
<flag name="contrib">additional scripts</flag>
|
||||
<flag name="idoutils">Adds DB support</flag>
|
||||
<flag name="lighttpd">Adds Lighttpd support</flag>
|
||||
<flag name="plugins">Adds support for nagios plugins</flag>
|
||||
<flag name="web">Adds generic web interface support</flag>
|
||||
<flag name="eventhandler">Adds support for running custom scripts whenever a host or service state change occurs</flag>
|
||||
</use>
|
||||
<maintainer type="person">
|
||||
<email>prometheanfire@gentoo.org</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">icinga/icinga-core</remote-id>
|
||||
<remote-id type="sourceforge">icinga</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -475,11 +475,6 @@ net-analyzer/zabbix
|
||||
# Removal in 30 days. Bug #691044.
|
||||
dev-python/tlslite
|
||||
|
||||
# Matthew Thode <prometheanfire@gentoo.org> (2020-02-17)
|
||||
# Discontinued upstream. Bug #709998
|
||||
net-analyzer/icinga
|
||||
net-analyzer/icinga-web
|
||||
|
||||
# Michał Górny <mgorny@gentoo.org> (2020-02-17)
|
||||
# Unmaintained. Last bumped in 2018. Blocks dev-qt/qtwebkit removal.
|
||||
# Removal in 30 days. Bug #709850.
|
||||
|
||||
Reference in New Issue
Block a user