diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-01-14 05:55:26 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-01-14 05:55:26 +0000 |
commit | 116d7e2ffa7c5effba54ad29b2359b7f30f91938 (patch) | |
tree | 4f9d2ba2aed65eebfeb4e779f9b44852805040f3 | |
parent | 5dc52c17264374b76be6fd8d1e3d8b0ed5f28d3e (diff) |
Use grep -q.
-rwxr-xr-x | postfix/postfix.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index e1cb635..e0ca33f 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -3,7 +3,7 @@ # /etc/local-COMMON/postfix/postfix.sh # Copyright 2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: postfix.sh,v 1.8 2003-01-14 05:51:52 jonas Exp $ +# $Id: postfix.sh,v 1.9 2003-01-14 05:55:26 jonas Exp $ # # Auto-tweak plain installed postfix Debian package # @@ -29,7 +29,7 @@ function getlinesfromfile() { } # Some badly configured setup use hostname instead of FQDN -if /usr/sbin/postconf myhostname | grep '.' &> /dev/null; then +if /usr/sbin/postconf myhostname | grep -q '.'; then /usr/sbin/postconf -e 'smtpd_helo_required = yes' fi /usr/sbin/postconf -e "`getlinesfromfile permit_mx_backup_networks`" @@ -53,7 +53,7 @@ if [ -f /usr/lib/postfix/tlsmgr -a -f /usr/lib/sasl/libplain.so -a -f /etc/ssl/c mkdir -p $confdir/sasl echo 'pwcheck_method: pam' >$confdir/sasl/smtpd.conf echo 'auto_transition: false' >>$confdir/sasl/smtpd.conf - groups postfix | grep shadow &>/dev/null || adduser postfix shadow + groups postfix | grep -q shadow || adduser postfix shadow # Release TLS-related daemons from chroot jail (bringing SASL into the jail is just too messy) cp -a $confdir/master.cf $confdir/master.cf.old cat $confdir/master.cf.old | sed \ @@ -61,7 +61,7 @@ if [ -f /usr/lib/postfix/tlsmgr -a -f /usr/lib/sasl/libplain.so -a -f /etc/ssl/c -e "s/^#\?\(\(smtps\|587\)$sp\+inet\($sp\+[n-]\)\{2\}$sp\+\)[n-]/\1n/" \ -e "s/^#\(tlsmgr$sp\)/\1/" \ > $confdir/master.cf - cat $confdir/master.cf | egrep "^tlsmgr$sp" > /dev/null || \ + cat $confdir/master.cf | egrep -q "^tlsmgr$sp" || \ echo 'tlsmgr fifo - - - 300 1 tlsmgr' >> $confdir/master.cf /usr/sbin/postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem' if [ -f /etc/ssl/private/postfix.pem ]; then |