wok diff nagios-nrpe/receipt @ rev 19169

slim-theme-*: move to 'customization' category
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jun 02 02:41:24 2016 +0300 (2016-06-02)
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	Thu Jun 02 02:41:24 2016 +0300
     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  }