wok-next rev 8704
add: nareto, nareto-doc
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Thu Feb 17 23:13:15 2011 +0100 (2011-02-17) |
parents | 4baffb6d5d2a |
children | 6ff9427d6fc7 |
files | nareto-doc/receipt nareto/receipt nareto/stuff/usr/share/nareto/img/centreon.gif nareto/stuff/usr/share/nareto/img/centreon.png |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/nareto-doc/receipt Thu Feb 17 23:13:15 2011 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="nareto-doc" 1.7 +VERSION="1.1.6" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Nareto documentation." 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="http://www.nareto.org/" 1.13 +WANTED="nareto" 1.14 +DEPENDS="nareto" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + mkdir -p $fs/usr/share/nareto 1.20 + cp -a $src/docs $fs/usr/share/nareto 1.21 +} 1.22 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/nareto/receipt Thu Feb 17 23:13:15 2011 +0100 2.3 @@ -0,0 +1,122 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="nareto" 2.7 +VERSION="1.1.6" 2.8 +CATEGORY="network" 2.9 +SHORT_DESC="Nagios reporting tool." 2.10 +MAINTAINER="erjo@slitaz.org" 2.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 2.12 +WEB_SITE="http://www.nareto.org/" 2.13 +WGET_URL="${WEB_SITE}srcs/$TARBALL" 2.14 +DEPENDS="nagios apache php php-cli mysql perl-dbd-mysql perl-dbi" 2.15 +CONFIG_FILES="/etc/nagios" 2.16 +BUGS="s/oreon/centreon/" 2.17 + 2.18 +# Rules to configure and make the package. 2.19 +compile_rules() 2.20 +{ 2.21 + cd $src 2.22 + chown -R www.www * 2.23 + chmod -R 755 * 2.24 + chmod u+x scripts/*.pl 2.25 +} 2.26 + 2.27 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.28 +genpkg_rules() 2.29 +{ 2.30 + mkdir -p $fs/usr/share $fs/etc/mysql.d $fs/etc/initcron.d $fs/etc/nagios 2.31 + 2.32 + cp -a $src $fs/usr/share/nareto 2.33 + cp -a stuff/* $fs 2.34 + sed -i 's/oreon.jpg/centreon.png/' $fs/usr/share/nareto/index.php 2.35 + sed -i -e 's/oreon/centreon/g' -e 's/Oreon/Centreon/g' \ 2.36 + $fs/usr/share/nareto/index.php \ 2.37 + $fs/usr/share/nareto/administration/gestion_auto.php 2.38 + find $fs/usr/share/nareto -type f | while read file; do 2.39 + case "$file" in 2.40 + *.jpg|*.png|*.gif|*.pdf|*.ttf|*.xls|*.html) continue;; 2.41 + esac 2.42 + dos2unix "$file" 2.43 + sed -i 's/<?/<?php /g' "$file" 2.44 + sed -i 's/<?php xml/<?xml/g' "$file" 2.45 + sed -i 's/<?php php/<?php/g' "$file" 2.46 + sed -i 's/<?php =/<?php echo /g' "$file" 2.47 + done 2.48 + mv $fs/usr/share/nareto/include/config.ini.php \ 2.49 + $fs/etc/nagios/nareto.init.php 2.50 + ln -s /etc/nagios/nareto.init.php \ 2.51 + $fs/usr/share/nareto/include/config.ini.php 2.52 + sed -i -e 's/user$/nareto/' -e 's/password$/nareto/' \ 2.53 + $fs/etc/nagios/nareto.init.php 2.54 + chmod 700 $fs/etc/nagios/nareto.init.php 2.55 + cat > $fs/etc/mysql.d/nareto <<EOM 2.56 +#!/bin/sh 2.57 + 2.58 +mysqldump nareto > /dev/null 2>&1 || mysql <<EOT 2.59 +create database nareto; 2.60 +use nareto; 2.61 + 2.62 +\. /usr/share/nareto/scripts/nareto.sql 2.63 + 2.64 +GRANT USAGE ON nareto.* TO 'nareto'@'localhost' IDENTIFIED BY 'nareto'; 2.65 +FLUSH PRIVILEGES; 2.66 + 2.67 +EOT 2.68 +chmod -x /etc/mysql.d/nareto 2.69 +EOM 2.70 + chmod +x $fs/etc/mysql.d/nareto 2.71 + cat > $fs/etc/initcron.d/nareto <<EOT 2.72 +# Reporting 2.73 +#FIXME LEAK?#*/5 * * * * root /usr/bin/php /usr/share/nareto/scripts/nareto_dispo_cron_5min.php > /dev/null 2>&1 2.74 +#FIXME LEAK?#2 * * * * root /usr/bin/php /usr/share/nareto/scripts/nareto_dispo_cron_1h.php > /dev/null 2>&1 2.75 +#FIXME LEAK?#4 14 * * * root /usr/bin/php /usr/share/nareto/scripts/nareto_dispo_cron_1jour.php > /dev/null 2>&1 2.76 + 2.77 +# Suivi des alarmes 2.78 +#FIXME LEAK?#30 0 * * * root /usr/bin/perl /usr/share/nareto/scripts/nagios_alert.pl > /dev/null 2>&1 2.79 +#FIXME LEAK?#0 1 * * * root /usr/bin/perl /usr/share/nareto/scripts/nagios_alert_agregation.pl > /dev/null 2>&1 2.80 + 2.81 +EOT 2.82 + chmod +x $fs/etc/initcron.d/nareto 2.83 + 2.84 + # Move doc in nareto-doc package. 2.85 + rm -rf $fs/usr/share/nareto/docs 2.86 +} 2.87 + 2.88 +post_install() 2.89 +{ 2.90 + [ -s $1/usr/share/nagios/.htaccess ] && 2.91 + cp $1/usr/share/nagios/.htaccess $1/usr/share/nareto/ 2.92 + # Configure lighttpd server 2.93 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 2.94 + if ! grep -q /usr/share/nareto/ $1/etc/lighttpd/lighttpd.conf; then 2.95 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/nareto/" => "/usr/share/nareto",|g' -i $1/etc/lighttpd/lighttpd.conf 2.96 + if [ -z "$1" ]; then 2.97 + # Start Web server. 2.98 + /etc/init.d/lighttpd stop 2.99 + /etc/init.d/lighttpd start 2.100 + fi 2.101 + fi 2.102 + fi 2.103 + 2.104 + # Configure apache server 2.105 + if [ -f $1/etc/apache/httpd.conf ]; then 2.106 + sed -i 's/lighttpd/apache/' $1/etc/rcS.conf 2.107 + if [ ! -f $1/etc/apache/conf.d/nareto ]; then 2.108 + cat > $1/etc/apache/conf.d/nareto <<EOT 2.109 +Alias /nareto/ /usr/share/nareto/ 2.110 +<Directory "/usr/share/nareto/"> 2.111 +Options None 2.112 +AllowOverride AuthConfig 2.113 +Order allow,deny 2.114 +Allow from all 2.115 +</Directory> 2.116 +EOT 2.117 + if [ -z "$1" ]; then 2.118 + # Start Web server. 2.119 + /etc/init.d/apache stop 2.120 + /etc/init.d/apache start 2.121 + fi 2.122 + fi 2.123 + fi 2.124 +} 2.125 +
3.1 Binary file nareto/stuff/usr/share/nareto/img/centreon.gif has changed
4.1 Binary file nareto/stuff/usr/share/nareto/img/centreon.png has changed