-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #34 (ACM certificate validation orderering)
- Loading branch information
Rasmus Rask
committed
May 15, 2019
1 parent
48537f5
commit 14dfe07
Showing
2 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
12 changes: 11 additions & 1 deletion
12
_sub/network/acm-certificate-san/element_from_json_array.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
cat ${1} | jq --arg index ${2} '.[$index|tonumber]' | ||
if [ -z "$4" ]; then | ||
echo "Need 4 arguments" | ||
exit 1 | ||
fi | ||
|
||
|
||
if [[ ${2} == "==" ]]; then | ||
cat ${1} | jq --arg domain_name ${3} --arg index ${4} 'map(select(.domain_name == $domain_name))[$index|tonumber]' | ||
else | ||
cat ${1} | jq --arg domain_name ${3} --arg index ${4} 'map(select(.domain_name != $domain_name))[$index|tonumber]' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters