wok-current diff nagios/receipt @ rev 23846

created recipe for python-random2
author Hans-G?nter Theisgen
date Sat Jun 13 15:49:44 2020 +0100 (2020-06-13)
parents baf354e69dbb
children eb5518b1b094
line diff
     1.1 --- a/nagios/receipt	Fri May 03 11:24:27 2019 +0100
     1.2 +++ b/nagios/receipt	Sat Jun 13 15:49:44 2020 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="nagios"
     1.7 -VERSION="4.4.3"
     1.8 +VERSION="4.4.5"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Host and network monitoring."
    1.11  MAINTAINER="erjo@slitaz.org"
    1.12 @@ -21,7 +21,8 @@
    1.13  {
    1.14  	while read patch_file
    1.15  	 do
    1.16 -		if [ ! -f done.$patch_file ]; then
    1.17 +		if [ ! -f done.$patch_file ]
    1.18 +		  then
    1.19  			patch -p1 < $stuff/$patch_file || return 1
    1.20  			touch done.$patch_file
    1.21  		fi
    1.22 @@ -60,34 +61,37 @@
    1.23  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.24  genpkg_rules()
    1.25  {
    1.26 -	mkdir -p $fs/usr $fs/etc/init.d \
    1.27 -	  $fs/var/lib/nagios/rw \
    1.28 -	  $fs/var/log/nagios \
    1.29 -	  $fs/var/spool/nagios/checkresults \
    1.30 -	  $fs/etc/apache
    1.31 +	mkdir -p $fs/usr $fs/etc/init.d
    1.32 +	mkdir -p $fs/var/lib/nagios/rw
    1.33 +	mkdir -p $fs/var/log/nagios
    1.34 +	mkdir -p $fs/var/spool/nagios/checkresults
    1.35 +	mkdir -p $fs/etc/apache
    1.36  		
    1.37  	cp -a $install/etc/apache	$fs/etc
    1.38  	cp -a $install/etc/nagios	$fs/etc
    1.39  	cp -a $stuff/nagios		$fs/etc/init.d
    1.40 -	install -o root -g root -m 644 $stuff/htpasswd.users  $fs/etc/nagios/
    1.41 +	install -o root -g root -m 644 $stuff/htpasswd.users \
    1.42 +					$fs/etc/nagios/
    1.43  	
    1.44  	cp -a $install/usr/bin		$fs/usr
    1.45  	cp -a $install/usr/lib		$fs/usr
    1.46  	cp -a $install/usr/share	$fs/usr
    1.47  	
    1.48  	# Put documentation in a separate package
    1.49 -	rm -rf $fs/usr/share/nagios/docs
    1.50 +	rm -rf				$fs/usr/share/nagios/docs
    1.51  	
    1.52 -	# Mofify Apache config for nagvis
    1.53 -	sed -i 's/Options None/Options FollowSymLinks/' $fs/etc/apache/conf.d/nagios.conf
    1.54 +	# Mofify Apache configuration for nagvis
    1.55 +	sed -i 's/Options None/Options FollowSymLinks/' \
    1.56 +		$fs/etc/apache/conf.d/nagios.conf
    1.57  
    1.58  	# Fix permissions 
    1.59 -	chmod 755 $fs/usr/bin/nagios*
    1.60 +	chmod 755			$fs/usr/bin/nagios*
    1.61  }
    1.62  
    1.63  post_install()
    1.64  {
    1.65 -	if ! grep -q nagios "$1/etc/passwd"; then
    1.66 +	if ! grep -q nagios "$1/etc/passwd"
    1.67 +	  then
    1.68  		echo -n "Adding user/group nagios..."
    1.69  		chroot "$1/" addgroup -S nagios
    1.70  		chroot "$1/" adduser -S -D -H -G nagios nagios
    1.71 @@ -95,12 +99,12 @@
    1.72  	fi
    1.73  	
    1.74  	# Fix permissions for files and directories
    1.75 -	chroot "$1/" chown -R nagios.nagios \
    1.76 -	  /var/log/nagios	\
    1.77 -	  /var/spool/nagios	\
    1.78 -	  /var/lib/nagios	\
    1.79 -	  /usr/share/nagios	\
    1.80 -	  /etc/nagios/*
    1.81 +	chroot "$1/" chown -R	nagios.nagios		\
    1.82 +				/var/log/nagios		\
    1.83 +				/var/spool/nagios	\
    1.84 +				/var/lib/nagios		\
    1.85 +				/usr/share/nagios	\
    1.86 +				/etc/nagios/*
    1.87  	
    1.88  	chmod 2775 "$1/var/lib/nagios/rw"
    1.89  	chroot "$1/" addgroup www nagios