wok rev 16740
Add nagisk
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 08 15:15:22 2014 +0200 (2014-06-08) |
parents | fd5cd41b18aa |
children | 47c328c464d3 |
files | hp15c/receipt nagisk/receipt |
line diff
1.1 --- a/hp15c/receipt Fri Jun 06 02:03:24 2014 +0300 1.2 +++ b/hp15c/receipt Sun Jun 08 15:15:22 2014 +0200 1.3 @@ -32,11 +32,13 @@ 1.4 cat > $fs/usr/share/applications/hp15c.desktop <<EOT 1.5 [Desktop Entry] 1.6 Encoding=UTF-8 1.7 -Name=HP-15C emulator 1.8 +Name=HP-15C Calculator 1.9 +Name[fr]=Calculatrice HP-15C 1.10 +Name[pt]=Calculadora HP-15C 1.11 Exec=/usr/share/hp15c/HP-15C.sh 1.12 Icon=/usr/share/hp15c/HP-15C.gif 1.13 Terminal=false 1.14 Type=Application 1.15 -Categories=Office; 1.16 +Categories=Application;Utility; 1.17 EOT 1.18 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/nagisk/receipt Sun Jun 08 15:15:22 2014 +0200 2.3 @@ -0,0 +1,49 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="nagisk" 2.7 +VERSION="1.2.5" 2.8 +CATEGORY="network" 2.9 +SHORT_DESC="Simple tool to monitor Asterisk from a Nagios server." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +LICENSE="GPL3" 2.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.13 +WEB_SITE="https://github.com/nicolargo/nagisk" 2.14 +WGET_URL="https://codeload.github.com/nicolargo/nagisk/tar.gz/v$VERSION" 2.15 + 2.16 +DEPENDS="nagios-nrpe perl sudo" 2.17 +BUILD_DEPENDS="wget" 2.18 + 2.19 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.20 +genpkg_rules() 2.21 +{ 2.22 + mkdir -p $fs/usr/share/nagios/libexec 2.23 + cp -a $src/nagisk.pl $fs/usr/share/nagios/libexec 2.24 + sed -i 's/^elsif/} &/' $fs/usr/share/nagios/libexec/nagisk.pl 2.25 +} 2.26 + 2.27 +# Pre and post install commands for Tazpkg. 2.28 +post_install() 2.29 +{ 2.30 + grep -qs check_asterisk_version $1/etc/nagios/nrpe.cfg || 2.31 + cat >> $1/etc/nagios/nrpe.cfg <<EOT 2.32 +command[check_asterisk_version]=/usr/share/nagios/libexec/nagisk.pl -c version 2.33 +command[check_asterisk_peers]=/usr/share/nagios/libexec/nagisk.pl -c peers -w \$ARG1\$ -x \$ARG2\$ 2.34 +command[check_asterisk_peer]=/usr/share/nagios/libexec/nagisk.pl -c peer -p \$ARG1\$ -w \$ARG2\$ -x \$ARG3\$ 2.35 +command[check_asterisk_channels]=/usr/share/nagios/libexec/nagisk.pl -c channels -w \$ARG1\$ -x \$ARG2\$ 2.36 +command[check_asterisk_konference]=/usr/share/nagios/libexec/nagisk.pl -c konference -w \$ARG1\$ -x \$ARG2\$ 2.37 +command[check_asterisk_jabber]=/usr/share/nagios/libexec/nagisk.pl -c jabber -b \$ARG1\$ 2.38 +#command[check_asterisk_zaptel]=/usr/share/nagios/libexec/nagisk.pl -c zaptel 2.39 +#command[check_asterisk_span]=/usr/share/nagios/libexec/nagisk.pl -c span -s \$ARG1\$ 2.40 +#command[check_asterisk_dahdi]=/usr/share/nagios/libexec/nagisk.pl -c dahdi 2.41 +#command[check_asterisk_dahdi_span]=/usr/share/nagios/libexec/nagisk.pl -c dahdi_span -s \$ARG1\$ 2.42 +#command[check_asterisk_pri_span]=/usr/share/nagios/libexec/nagisk.pl -c pri_span -s \$ARG1\$ 2.43 +#command[check_asterisk_pri_spans]=/usr/share/nagios/libexec/nagisk.pl -c pri_spans 2.44 +command[check_asterisk_registry]=/usr/share/nagios/libexec/nagisk.pl -c registry 2.45 +EOT 2.46 + grep '^nagios ALL= NOPASSWD' $1/etc/sudoers | grep -q asterisk || 2.47 + cat >> $1/etc/sudoers <<EOT 2.48 +www ALL= NOPASSWD: /usr/sbin/asterisk 2.49 +EOT 2.50 + chown nagios:nagios $1/usr/share/nagios/libexec 2.51 + chown nagios:nagios $1/usr/share/nagios/libexec/nagisk.pl 2.52 +}