1
0
mirror of https://github.com/omni-lchen/zabbix-ssl synced 2024-12-21 08:27:52 +01:00

Merge pull request #6 from rerime/master

Fix syntax.
This commit is contained in:
Long Chen 2018-06-06 17:41:38 +01:00 committed by GitHub
commit 9ada52cb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ DOMAIN_GROUP=$1
ZABBIX_HOST=$2
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
ALL_DOMAINS=$SCRIPT_DIR"/ssl/sslCertDomains.json"
QUERY_DOMAINS=$(eval "cat $ALL_DOMAINS | jq -r '."$DOMAIN_GROUP"[] .domain' | xargs 2>/dev/null")
QUERY_DOMAINS=$(cat $ALL_DOMAINS | jq --arg DOMAIN_GROUP $DOMAIN_GROUP -r '.[$DOMAIN_GROUP][] .domain' | xargs 2>/dev/null)
get_SSL_Certs_Expirydate() {
for domain in $QUERY_DOMAINS; do

View File

@ -8,7 +8,7 @@
DOMAIN_GROUP=$1
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
ALL_DOMAINS=$SCRIPT_DIR"/ssl/sslCertDomains.json"
QUERY_DOMAINS=$(eval "cat $ALL_DOMAINS | jq -r '."$DOMAIN_GROUP"[] .domain' | xargs 2>/dev/null")
QUERY_DOMAINS=$(cat $ALL_DOMAINS | jq --arg DOMAIN_GROUP $DOMAIN_GROUP -r '.[$DOMAIN_GROUP][].domain' | xargs 2>/dev/null)
for domain in $QUERY_DOMAINS; do
domainlist="$domainlist,"'{"{#DOMAIN}":"'${domain# }'"}'