wok-next view nagios-nrpe/receipt @ rev 21196
updated scrollz again (2.2.3 -> 2.3)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Oct 03 16:09:40 2019 +0100 (2019-10-03) |
parents | a3c581bf52b8 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="nagios-nrpe"
4 VERSION="2.14"
5 CATEGORY="network"
6 SHORT_DESC="Service and network monitoring program, remote monitoring"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.nagios.org/"
11 TARBALL="nrpe-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/nagios/$TARBALL"
14 BUILD_DEPENDS="openssl-dev openssl libwrap-dev"
16 compile_rules() {
17 ./configure \
18 --datadir=/usr/share/nagios \
19 --sysconfdir=/etc/nagios \
20 --sbindir=/usr/lib/nagios \
21 --bindir=/usr/bin \
22 --libexecdir=/usr/lib/nagios/plugins \
23 --with-nagios-user=nagios \
24 --with-nagios-group=nagios \
25 --with-nrpe-user=nagios \
26 --with-nrpe-group=nagios \
27 $CONFIGURE_ARGS &&
28 make all &&
29 make install || return 1
31 # Install config file nd init script
32 install -Dm644 $stuff/nrpe.cfg $install/etc/nagios/objects/nrpe.cfg
33 install -Dm755 $stuff/nrpe $install/etc/init.d/nrpe
35 install -Dm644 $src/sample-config/nrpe.cfg $install/etc/nagios/nrpe.cfg
36 sed -i 's|/var/run|/var/run/nagios|' $install/etc/nagios/nrpe.cfg
37 }
39 genpkg_rules() {
40 copy @std
41 DEPENDS="nagios-plugins openssl"
42 }
44 post_install() {
45 if ! grep -q nagios "$1/etc/passwd"; then
46 chroot "$1/" adduser -S -D -H nagios
47 fi
49 # Set perms for files and directories
50 chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
51 chroot "$1/" chown nagios.nagios /etc/nagios/*
53 # Add check_nrpe in nagios config file
54 echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> "$1/etc/nagios/nagios.cfg"
55 }
57 post_remove() {
58 [ -f "$1/etc/nagios/nagios.cfg" ] &&
59 sed -i 's/.*nrpe.cfg//' "$1/etc/nagios/nagios.cfg"
60 }