wok-next diff ntop/receipt @ rev 18930
mmv, sqlite, unclutter: use EXTRA_SOURCE_FILES to track the sources files
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Feb 26 17:55:33 2016 +0100 (2016-02-26) |
parents | 9689f1b75619 |
children | fe76d2fe539b |
line diff
1.1 --- a/ntop/receipt Tue Dec 30 10:01:09 2014 +0100 1.2 +++ b/ntop/receipt Fri Feb 26 17:55:33 2016 +0100 1.3 @@ -56,18 +56,18 @@ 1.4 user=ntop 1.5 group=ntop 1.6 1.7 - if ! grep -q $user: $1/etc/passwd; then 1.8 + if ! grep -q $user: "$1/etc/passwd"; then 1.9 echo -n "Adding user/group $user..." 1.10 - chroot $1/ addgroup -S $user 1.11 - chroot $1/ adduser -S -D -H -G $group $user 1.12 + chroot "$1/" addgroup -S $user 1.13 + chroot "$1/" adduser -S -D -H -G $group $user 1.14 status 1.15 fi 1.16 1.17 # Fix perms for files and directories 1.18 - chroot $1/ chown -R ${user}.${group} /var/lib/ntop /var/log/ntop 1.19 + chroot "$1/" chown -R ${user}.${group} /var/lib/ntop /var/log/ntop 1.20 1.21 # Start package daemon if we are on running system 1.22 - [ -z $1 ] && /etc/init.d/$PACKAGE start 1.23 + [ "$1" ] || /etc/init.d/$PACKAGE start 1.24 1.25 # post_install messges 1.26 echo -e "\nTo starts $PACKAGE server you can run :\n" 1.27 @@ -77,7 +77,7 @@ 1.28 1.29 pre_remove() 1.30 { 1.31 - [ -z $1 ] && /etc/init.d/$PACKAGE stop 1.32 + [ "$1" ] || /etc/init.d/$PACKAGE stop 1.33 } 1.34 1.35 post_remove() 1.36 @@ -85,10 +85,10 @@ 1.37 user=ntop 1.38 group=ntop 1.39 1.40 - if ! grep -q $user: $1/etc/passwd; then 1.41 + if ! grep -q $user: "$1/etc/passwd"; then 1.42 echo -n "Removing user/group $user..." 1.43 - chroot $1/ delgroup $user 1.44 - chroot $1/ deluser $user 1.45 + chroot "$1/" delgroup $user 1.46 + chroot "$1/" deluser $user 1.47 status 1.48 fi 1.49 }