Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
fixed init scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
njones-lanl committed Mar 13, 2024
1 parent 65e931e commit 2ba9c01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions krakend-acme/init.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh
step ca bootstrap --ca-url=https://SI.ca --fingerprint=$(cat /mnt/defaults.json | jq '.fingerprint' -r) --install
if ! [ -f /root/.acme.sh/SI.endpoint_ecc/SI.endpoint.cer -a -f /root/.acme.sh/SI.endpoint_ecc/SI.endpoint.key ]
if ! [ -f /root/.acme.sh/SI.krakend_ecc/SI.krakend.cer -a -f /root/.acme.sh/SI.krakend_ecc/SI.krakend.key ]
then
rm -rf /root/.acme.sh/SI.endpoint_ecc/
/root/.acme.sh/acme.sh --force --issue --standalone -d SI.endpoint --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
rm -rf /root/.acme.sh/SI.krakend_ecc/
/root/.acme.sh/acme.sh --force --issue --standalone -d SI.krakend --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
else
/root/.acme.sh/acme.sh --issue --standalone -d SI.endpoint --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
/root/.acme.sh/acme.sh --issue --standalone -d SI.krakend --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
fi
update_loop.sh &
/usr/bin/krakend run --config /etc/krakend.json
Expand Down
8 changes: 4 additions & 4 deletions krakend-acme/update_loop.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
while true
do
if ! [ -f /root/.acme.sh/SI.endpoint_ecc/SI.endpoint.cer -a -f /root/.acme.sh/SI.endpoint_ecc/SI.endpoint.key ]
if ! [ -f /root/.acme.sh/SI.krakend_ecc/SI.krakend.cer -a -f /root/.acme.sh/SI.krakend_ecc/SI.krakend.key ]
then
rm -rf /root/.acme.sh/SI.endpoint_ecc/
/root/.acme.sh/acme.sh --force --issue --standalone -d SI.endpoint --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
rm -rf /root/.acme.sh/SI.krakend_ecc/
/root/.acme.sh/acme.sh --force --issue --standalone -d SI.krakend --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
else
/root/.acme.sh/acme.sh --issue --standalone -d SI.endpoint --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
/root/.acme.sh/acme.sh --issue --standalone -d SI.krakend --server https://SI.ca/acme/acme/directory --ca-bundle $(step path)/certs/root_ca.crt
fi
sleep 7200
done
Expand Down

0 comments on commit 2ba9c01

Please sign in to comment.