# listen on loopback interface only:
sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf
- grep inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf
+ grep -q inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf
fi
fi
}
# copy scripts that should be executed inside the chroot:
_opt_chroot_scripts=${_opt_chroot_scripts:-$CONFFILES/chroot-scripts/}
- [ -f $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && \
+ [ -d $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && \
cp -a $VERBOSE $_opt_chroot_scripts $MNTPOINT/etc/debootstrap/
# notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead!