init
This commit is contained in:
commit
d41794e65d
5 changed files with 182 additions and 0 deletions
12
files/get_cert.sh
Executable file
12
files/get_cert.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
CAHOST=root@hermes.dmz
|
||||
|
||||
eval "$(jq -r '@sh "PUBKEY=\(.pubkey) HOST=\(.host)"')"
|
||||
|
||||
# TODO: Can this be done more eye-pleasingly?
|
||||
CERT=$(ssh $CAHOST '/root/ca.sh host "'"$PUBKEY"'" "'"$HOST"'".dmz')
|
||||
|
||||
jq -n --arg cert "$CERT" '{"cert":$cert}'
|
Reference in a new issue