Refactor JSON creation in create_json function to enhance domain entry handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -45,7 +45,7 @@ create_json() {
|
|||||||
if . == null or . == [] then
|
if . == null or . == [] then
|
||||||
{"'$DOMAIN'":{"date": "'$DATE'", "status": "'$STATUS'", "log": "'$LOG'"}}
|
{"'$DOMAIN'":{"date": "'$DATE'", "status": "'$STATUS'", "log": "'$LOG'"}}
|
||||||
else
|
else
|
||||||
(map(select(has("'$DOMAIN'") | not)) | from_entries) + {"'$DOMAIN'": {"date": "'$DATE'", "status": "'$STATUS'", "log": "'$LOG'" }}
|
. + {"'$DOMAIN'": {"date": "'$DATE'", "status": "'$STATUS'", "log": "'$LOG'"}}
|
||||||
end
|
end
|
||||||
' $LETSENCRYPT_OUTPUT >$TMP_FILE
|
' $LETSENCRYPT_OUTPUT >$TMP_FILE
|
||||||
cat $TMP_FILE >$LETSENCRYPT_OUTPUT
|
cat $TMP_FILE >$LETSENCRYPT_OUTPUT
|
||||||
|
Reference in New Issue
Block a user