wok-6.x diff nagvis/receipt @ rev 23834

Up alsa-lib (1.2.2), apache-ant (1.10.8), apache (2.4.43), lcms2 (2.10), libexit (0.6.22)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jun 01 09:10:42 2020 +0000 (2020-06-01)
parents 4e6f31d3d204
children ad8b9ff412d2
line diff
     1.1 --- a/nagvis/receipt	Fri May 03 13:39:55 2019 +0100
     1.2 +++ b/nagvis/receipt	Mon Jun 01 09:10:42 2020 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="nagvis"
     1.7 -VERSION="1.9.11"
     1.8 +VERSION="1.9.18"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Visualization addon for nagios."
    1.11  MAINTAINER="erjo@slitaz.org"
    1.12 @@ -17,11 +17,11 @@
    1.13  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.14  genpkg_rules()
    1.15  {
    1.16 -	mkdir -p $fs/usr/share/nagvis \
    1.17 -		$fs/etc/apache/conf.d \
    1.18 -		$fs/var/lib/nagvis/var/tmpl/cache \
    1.19 -		$fs/var/lib/nagvis/var/tmpl/compile \
    1.20 -		$fs/usr/share/doc/nagvis
    1.21 +	mkdir -p $fs/usr/share/nagvis
    1.22 +	mkdir -p $fs/etc/apache/conf.d
    1.23 +	mkdir -p $fs/var/lib/nagvis/var/tmpl/cache
    1.24 +	mkdir -p $fs/var/lib/nagvis/var/tmpl/compile
    1.25 +	mkdir -p $fs/usr/share/doc/nagvis
    1.26  	
    1.27  	cp -a $src/share	$fs/usr/share/nagvis
    1.28  	cp -a $src/etc		$fs/etc/nagvis
    1.29 @@ -30,11 +30,11 @@
    1.30  	#~ cp $fs/usr/share/nagios/nagvis/nagvis/images/maps/nagvis-demo.png \
    1.31  		#~ $fs/var/lib/nagvis/automap.png
    1.32  
    1.33 -	# link  var directory (FHS)	
    1.34 +	# link var directory (FHS)	
    1.35  	ln -s /var/lib/nagvis/var  $fs/usr/share/nagvis/var
    1.36  
    1.37  	# move configuration files
    1.38 -	ln -s /etc/nagvis $fs/usr/share/nagvis/etc
    1.39 +	ln -s /etc/nagvis	$fs/usr/share/nagvis/etc
    1.40  
    1.41  	# nagvis configuration
    1.42  	mv $fs/etc/nagvis/nagvis.ini.php-sample $fs/etc/nagvis/nagvis.ini.php
    1.43 @@ -59,39 +59,47 @@
    1.44  logonenvvar="REMOTE_USER"\
    1.45  logonenvcreateuser="0"
    1.46  	}' $fs/etc/nagvis/nagvis.ini.php
    1.47 -	sed -i -e '/;socket/ a\socket="unix:/var/lib/nagios/rw/live"' $fs/etc/nagvis/nagvis.ini.php
    1.48 -	sed -i -e 's/;showautomaps=1/showautomaps=0/' $fs/etc/nagvis/nagvis.ini.php
    1.49 +	sed -i -e '/;socket/ a\socket="unix:/var/lib/nagios/rw/live"' \
    1.50 +		$fs/etc/nagvis/nagvis.ini.php
    1.51 +	sed -i -e 's/;showautomaps=1/showautomaps=0/' \
    1.52 +		$fs/etc/nagvis/nagvis.ini.php
    1.53  	
    1.54  	# Apache configuration
    1.55 -	mv $fs/etc/nagvis/apache2-nagvis.conf-sample	$fs/etc/nagvis/apache2-nagvis.conf
    1.56 -	ln -s /etc/nagvis/apache2-nagvis.conf		$fs/etc/apache/conf.d/nagvis.conf
    1.57 +	mv $fs/etc/nagvis/apache2-nagvis.conf-sample \
    1.58 +			$fs/etc/nagvis/apache2-nagvis.conf
    1.59 +	ln -s /etc/nagvis/apache2-nagvis.conf \
    1.60 +			$fs/etc/apache/conf.d/nagvis.conf
    1.61  	sed -i -e 's|@NAGVIS_WEB@|/nagvis|' \
    1.62  		-e 's|@NAGVIS_PATH@|/usr/share/nagvis|' \
    1.63  		-e 's|#AuthName|AuthName|' \
    1.64  		-e 's|#AuthType|AuthType|' \
    1.65  		-e 's|#AuthUserFile|AuthUserFile|' \
    1.66  		-e 's|@NAGIOS_PATH@.*|/etc/nagios/htpasswd.users|' \
    1.67 -		-e 's| #Require|Require|' $fs/etc/nagvis/apache2-nagvis.conf
    1.68 +		-e 's| #Require|Require|' \
    1.69 +		$fs/etc/nagvis/apache2-nagvis.conf
    1.70  	
    1.71  	# Fix permissions
    1.72 -	chown -R www.www $fs/usr/share/nagvis $fs/var/lib/nagvis
    1.73 -	chown -R root.www $fs/etc/nagvis
    1.74 +	chown -R www.www	$fs/usr/share/nagvis
    1.75 +	chown -R www.www	$fs/var/lib/nagvis
    1.76 +	chown -R root.www	$fs/etc/nagvis
    1.77  	
    1.78 -	chmod 664 $fs/etc/nagvis/nagvis.ini.php  
    1.79 -	chmod 775 $fs/etc/nagvis/maps
    1.80 -	chmod 664 $fs/etc/nagvis/maps/*
    1.81 -	chmod 664 $fs/etc/nagvis/geomap/*
    1.82 -#	chmod 664 $fs/etc/nagvis/automaps/*
    1.83 -	chmod 775 $fs/var/lib/nagvis
    1.84 +	chmod 664		$fs/etc/nagvis/nagvis.ini.php  
    1.85 +	chmod 775		$fs/etc/nagvis/maps
    1.86 +	chmod 664		$fs/etc/nagvis/maps/*
    1.87 +	chmod 664		$fs/etc/nagvis/geomap/*
    1.88 +#	chmod 664		$fs/etc/nagvis/automaps/*
    1.89 +	chmod 775		$fs/var/lib/nagvis
    1.90  
    1.91  	# Cleanup
    1.92 -	rm -f $fs/usr/share/nagvis/install.*
    1.93 -	rm -f $fs/usr/share/nagvis/share/uifx
    1.94 +	rm -f			$fs/usr/share/nagvis/install.*
    1.95 +	rm -f			$fs/usr/share/nagvis/share/uifx
    1.96  	
    1.97 -	mv $fs/usr/share/nagvis/share/userfiles/images/maps $fs/var/lib/nagvis
    1.98 -	chmod 775 $fs/var/lib/nagvis/maps
    1.99 -	chmod 664 $fs/var/lib/nagvis/maps/*
   1.100 -	ln -s /var/lib/nagvis/maps $fs/usr/share/nagvis/share/userfiles/images/
   1.101 +	mv $fs/usr/share/nagvis/share/userfiles/images/maps \
   1.102 +				$fs/var/lib/nagvis
   1.103 +	chmod 775		$fs/var/lib/nagvis/maps
   1.104 +	chmod 664		$fs/var/lib/nagvis/maps/*
   1.105 +	ln -s /var/lib/nagvis/maps \
   1.106 +				$fs/usr/share/nagvis/share/userfiles/images/
   1.107  }
   1.108  
   1.109  post_install()
   1.110 @@ -99,7 +107,8 @@
   1.111  	cat <<EOT
   1.112  Now visit http://localhost/nagvis
   1.113  EOT
   1.114 -	if [ -z "$1" ]; then
   1.115 +	if [ -z "$1" ]
   1.116 +	  then
   1.117  		/etc/init.d/nagios stop
   1.118  		/etc/init.d/nagios start
   1.119  	fi