wok-next diff nagios-nrpe/receipt @ rev 20143
postgresql: receipt v2
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 01 11:18:25 2017 +0100 (2017-11-01) |
parents | 0d8a1a3edc72 |
children | e6615350078d |
line diff
1.1 --- a/nagios-nrpe/receipt Sun May 18 20:24:07 2014 +0000 1.2 +++ b/nagios-nrpe/receipt Wed Nov 01 11:18:25 2017 +0100 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 }