wok-6.x diff nagios-plugins/receipt @ rev 19386

Up palemoon (26.4.0)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Sat Aug 20 04:20:02 2016 +0200 (2016-08-20)
parents dead8955c3ca
children 970c5ec9a60a
line diff
     1.1 --- a/nagios-plugins/receipt	Wed Sep 25 09:50:51 2013 +0000
     1.2 +++ b/nagios-plugins/receipt	Sat Aug 20 04:20:02 2016 +0200
     1.3 @@ -48,18 +48,18 @@
     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/group nagios..."
    1.10 -		chroot $1/ addgroup -S nagios
    1.11 -		chroot $1/ adduser -S -D -H -G nagios nagios
    1.12 +		chroot "$1/" addgroup -S nagios
    1.13 +		chroot "$1/" adduser -S -D -H -G nagios nagios
    1.14  		status
    1.15  	fi
    1.16  	
    1.17 -	if [ -f $1/etc/nagios/resource.cfg ]; then
    1.18 +	if [ -f "$1/etc/nagios/resource.cfg" ]; then
    1.19  		sed -i 's|/usr/lib/nagios|/usr/lib/nagios/plugins|' \
    1.20 -		   $1/etc/nagios/resource.cfg
    1.21 +		   "$1/etc/nagios/resource.cfg"
    1.22  	fi
    1.23  	# Set perms for files and directories
    1.24 -	chroot $1/ chown -R nagios.nagios /usr/lib/nagios/plugins 
    1.25 -	chroot $1/ chown -R nagios.nagios /etc/nagios/objects
    1.26 +	chroot "$1/" chown -R nagios.nagios /usr/lib/nagios/plugins 
    1.27 +	chroot "$1/" chown -R nagios.nagios /etc/nagios/objects
    1.28  }