Avoid unnecessary here-doc.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 May 2010 10:32:24 +0000 (10:32 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 11 May 2010 10:32:24 +0000 (10:32 +0000)
plc.d/ssl

index ab64a80..aa3a0fe 100755 (executable)
--- a/plc.d/ssl
+++ b/plc.d/ssl
@@ -49,9 +49,8 @@ verify_or_generate_certificate() {
 
     if [ -f $crt ] ; then
        # Check if certificate is valid
-       verify=$(openssl verify -CAfile $ca $crt)
        # Backup if invalid or if the subject has changed
-       if grep -q "error" <<<$verify || \
+       if openssl verify -CAfile $ca $crt | grep -q "error" || \
            [ "$(ssl_cname $crt)" != "$cname" ] ; then
             backup_file $crt
             backup_file $ca