wok-6.x diff nagios-nrpe/receipt @ rev 19092

Add brower-html5 virtual package (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 01 10:46:33 2016 +0200 (2016-05-01)
parents 0d8a1a3edc72
children 970c5ec9a60a
line diff
     1.1 --- a/nagios-nrpe/receipt	Sun May 18 20:24:07 2014 +0000
     1.2 +++ b/nagios-nrpe/receipt	Sun May 01 10:46:33 2016 +0200
     1.3 @@ -59,21 +59,21 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 -	if ! grep -q nagios $1/etc/passwd; then
     1.8 +	if ! grep -q nagios "$1/etc/passwd"; then
     1.9  		echo -n "Adding user nagios..."
    1.10 -		chroot $1/ adduser -S -D -H nagios
    1.11 +		chroot "$1/" adduser -S -D -H nagios
    1.12  		status
    1.13  	fi
    1.14  	
    1.15  	# Set perms for files and directories
    1.16 -	chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins
    1.17 -	chroot $1/ chown  nagios.nagios /etc/nagios/* 
    1.18 +	chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins
    1.19 +	chroot "$1/" chown  nagios.nagios /etc/nagios/* 
    1.20  	
    1.21  	# Add check_nrpe in nagios config file
    1.22 -	echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> $1/etc/nagios/nagios.cfg
    1.23 +	echo "cfg_file=/etc/nagios/objects/nrpe.cfg" >> "$1/etc/nagios/nagios.cfg"
    1.24  }
    1.25  
    1.26  post_remove()
    1.27  {
    1.28 -	[ -f $1/etc/nagios/nagios.cfg ] && sed -i 's/.*nrpe.cfg//' $1/etc/nagios/nagios.cfg
    1.29 +	[ -f "$1/etc/nagios/nagios.cfg" ] && sed -i 's/.*nrpe.cfg//' "$1/etc/nagios/nagios.cfg"
    1.30  }