This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new 87a2fe24ad AIRAVATA-3609 Fix check-domains.sh script for openssl on 
Rocky
87a2fe24ad is described below

commit 87a2fe24ad8e39c670c80b32f0d59cbfc95d2e71
Author: Marcus Christie <[email protected]>
AuthorDate: Wed Aug 3 17:50:12 2022 -0400

    AIRAVATA-3609 Fix check-domains.sh script for openssl on Rocky
    
    openssl -checkend prints a message to stdout even when -noout is specified.
    So this change redirects stdout to /dev/null. Only the exit code is needed.
---
 dev-tools/ansible/roles/zabbix/files/check-domains.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-tools/ansible/roles/zabbix/files/check-domains.sh 
b/dev-tools/ansible/roles/zabbix/files/check-domains.sh
index 467c28536e..fe78699972 100644
--- a/dev-tools/ansible/roles/zabbix/files/check-domains.sh
+++ b/dev-tools/ansible/roles/zabbix/files/check-domains.sh
@@ -22,7 +22,7 @@ DOMAIN_CHECKLIST=/etc/zabbix/domain_checklist
 EXPIRES_IN_DAYS=28
 
 while IFS="" read domain; do
-    data=`echo |openssl s_client -servername $domain -connect $domain:443 
2>/dev/null | openssl x509 -noout -checkend $(( $EXPIRES_IN_DAYS * 86400 )) 
2>/dev/null && echo good || echo "$domain expires in less than $EXPIRES_IN_DAYS 
days"`
+    data=`echo |openssl s_client -servername $domain -connect $domain:443 
2>/dev/null | openssl x509 -noout -checkend $(( $EXPIRES_IN_DAYS * 86400 )) >& 
/dev/null && echo good || echo "$domain expires in less than $EXPIRES_IN_DAYS 
days"`
     if [ "$data" != "good" ]; then
         echo $data
     fi

Reply via email to