wok-next annotate nagisk/receipt @ rev 20996
Move fonts-liberation*
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Oct 04 16:01:47 2018 +0300 (2018-10-04) |
parents | 9e01bc6321ea |
children |
rev | line source |
---|---|
al@20513 | 1 # SliTaz package receipt v2. |
pascal@16740 | 2 |
pascal@16740 | 3 PACKAGE="nagisk" |
pascal@16740 | 4 VERSION="1.2.5" |
pascal@16740 | 5 CATEGORY="network" |
al@20513 | 6 SHORT_DESC="Simple tool to monitor Asterisk from a Nagios server" |
pascal@16740 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@16740 | 8 LICENSE="GPL3" |
al@20513 | 9 WEB_SITE="https://github.com/nicolargo/nagisk" |
al@20513 | 10 |
pascal@16740 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@16740 | 12 WGET_URL="https://codeload.github.com/nicolargo/nagisk/tar.gz/v$VERSION" |
pascal@16740 | 13 |
al@20513 | 14 compile_rules() { |
al@20513 | 15 mkdir -p $install/usr/share/nagios/libexec/ |
al@20513 | 16 cp -a $src/nagisk.pl $install/usr/share/nagios/libexec/ |
al@20513 | 17 sed -i 's/^elsif/} &/' $install/usr/share/nagios/libexec/nagisk.pl |
pascal@16740 | 18 } |
pascal@16740 | 19 |
al@20513 | 20 genpkg_rules() { |
al@20513 | 21 copy @std |
al@20513 | 22 DEPENDS="nagios-nrpe perl sudo" |
al@20513 | 23 } |
al@20513 | 24 |
al@20513 | 25 post_install() { |
pascal@18730 | 26 grep -qs check_asterisk_version "$1/etc/nagios/nrpe.cfg" || |
pascal@18730 | 27 cat >> "$1/etc/nagios/nrpe.cfg" <<EOT |
pascal@16740 | 28 command[check_asterisk_version]=/usr/share/nagios/libexec/nagisk.pl -c version |
pascal@16740 | 29 command[check_asterisk_peers]=/usr/share/nagios/libexec/nagisk.pl -c peers -w \$ARG1\$ -x \$ARG2\$ |
pascal@16740 | 30 command[check_asterisk_peer]=/usr/share/nagios/libexec/nagisk.pl -c peer -p \$ARG1\$ -w \$ARG2\$ -x \$ARG3\$ |
pascal@16740 | 31 command[check_asterisk_channels]=/usr/share/nagios/libexec/nagisk.pl -c channels -w \$ARG1\$ -x \$ARG2\$ |
pascal@16740 | 32 command[check_asterisk_konference]=/usr/share/nagios/libexec/nagisk.pl -c konference -w \$ARG1\$ -x \$ARG2\$ |
pascal@16740 | 33 command[check_asterisk_jabber]=/usr/share/nagios/libexec/nagisk.pl -c jabber -b \$ARG1\$ |
pascal@16740 | 34 #command[check_asterisk_zaptel]=/usr/share/nagios/libexec/nagisk.pl -c zaptel |
pascal@16740 | 35 #command[check_asterisk_span]=/usr/share/nagios/libexec/nagisk.pl -c span -s \$ARG1\$ |
pascal@16740 | 36 #command[check_asterisk_dahdi]=/usr/share/nagios/libexec/nagisk.pl -c dahdi |
pascal@16740 | 37 #command[check_asterisk_dahdi_span]=/usr/share/nagios/libexec/nagisk.pl -c dahdi_span -s \$ARG1\$ |
pascal@16740 | 38 #command[check_asterisk_pri_span]=/usr/share/nagios/libexec/nagisk.pl -c pri_span -s \$ARG1\$ |
pascal@16740 | 39 #command[check_asterisk_pri_spans]=/usr/share/nagios/libexec/nagisk.pl -c pri_spans |
pascal@16740 | 40 command[check_asterisk_registry]=/usr/share/nagios/libexec/nagisk.pl -c registry |
pascal@16740 | 41 EOT |
pascal@18730 | 42 grep '^nagios ALL=NOPASSWD' "$1/etc/sudoers" | grep -q asterisk || |
pascal@18730 | 43 cat >> "$1/etc/sudoers" <<EOT |
pascal@17694 | 44 nagios ALL=NOPASSWD: /usr/sbin/asterisk |
pascal@16740 | 45 EOT |
pascal@18730 | 46 chroot "$1/" chown nagios:nagios /usr/share/nagios/libexec/nagisk.pl |
pascal@16740 | 47 } |