wok-next diff nagios/receipt @ rev 19153

udisks2: mount to "/media/", Up slitaz-tools*(978)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon May 23 23:30:37 2016 +0300 (2016-05-23)
parents 0d8a1a3edc72
children dd145c435e4b
line diff
     1.1 --- a/nagios/receipt	Sun May 18 20:24:07 2014 +0000
     1.2 +++ b/nagios/receipt	Mon May 23 23:30:37 2016 +0300
     1.3 @@ -84,26 +84,26 @@
     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  	# Fix perms for files and directories
    1.18 -	chroot $1/ chown -R nagios.nagios /var/log/nagios \
    1.19 +	chroot "$1/" chown -R nagios.nagios /var/log/nagios \
    1.20  	  /var/spool/nagios \
    1.21  	  /var/lib/nagios \
    1.22  	  /usr/share/nagios \
    1.23  	  /etc/nagios/*
    1.24  	  
    1.25  	
    1.26 -	chmod 2775 $1/var/lib/nagios/rw
    1.27 -	chroot $1/ addgroup www nagios
    1.28 +	chmod 2775 "$1/var/lib/nagios/rw"
    1.29 +	chroot "$1/" addgroup www nagios
    1.30  	
    1.31  	# Start Nagios daemon if we are  on running system
    1.32 -	[ -z $1 ] && /etc/init.d/nagios start
    1.33 +	[ "$1" ] || /etc/init.d/nagios start
    1.34  	
    1.35  	# post_install messges
    1.36  	echo -e "\nTo starts $PACKAGE server you can run :\n"
    1.37 @@ -114,5 +114,5 @@
    1.38  
    1.39  pre_remove()
    1.40  {
    1.41 -	[ -z $1 ] && /etc/init.d/nagios stop
    1.42 +	[ "$1" ] || /etc/init.d/nagios stop
    1.43  }