Add dns-pfx-helper/entrypoint.sh
This commit is contained in:
parent
8bbf797422
commit
518e29ec4a
1 changed files with 20 additions and 0 deletions
20
dns-pfx-helper/entrypoint.sh
Normal file
20
dns-pfx-helper/entrypoint.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
!/usr/bin/env fish
|
||||
|
||||
set cert_file ./mnt/in/priv-fullchain-bundle.pem
|
||||
set pfx_file ./mnt/out/cert.pfx
|
||||
set password $PFX_PASSWORD
|
||||
|
||||
# touch $cert_file
|
||||
|
||||
echo "pass: $password"
|
||||
|
||||
# Initial conversion
|
||||
openssl pkcs12 -export -out $pfx_file -inkey $cert_file -in $cert_file -password pass:$password
|
||||
|
||||
# Watch for changes and convert
|
||||
while true
|
||||
inotifywait -e modify $cert_file
|
||||
echo "refreshing key"
|
||||
openssl pkcs12 -export -out $pfx_file -inkey $cert_file -in $cert_file -password pass:$password
|
||||
sleep 1 # prevent failloop
|
||||
end
|
Loading…
Add table
Reference in a new issue