mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
added check for docker image to wrapper
This commit is contained in:
parent
823561f122
commit
bdb40d339e
1 changed files with 11 additions and 3 deletions
|
@ -5,13 +5,21 @@
|
|||
|
||||
FQDN=$1
|
||||
|
||||
if docker inspect --type=image certupdater:0.1.0 &>/dev/null; then
|
||||
echo " * ok, certupdater docker image found"
|
||||
else
|
||||
echo " * No docker image for certupdater found."
|
||||
echo " * A docker image of certupdater need to be present on the host."
|
||||
echo " * Follow the instructions at https://github.com/RaaLabs/certupdater"
|
||||
echo " * to build and install it as a docker image."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if docker run -it --rm -v "$PWD:/certs/:rw" -p 80:80 -p 443:443 -e DAEMON=false -e USER_FOLDER=/certs -e PROD=false -e DOMAIN="$FQDN" certupdater:0.1.0; then
|
||||
echo " * successfully generated LetsEncrypt certificate"
|
||||
else
|
||||
echo " * failed to generate LetsEncrypt certificate."
|
||||
echo " * a docker image of cert updater need to be present on the host."
|
||||
echo " * Follow the instructions at https://github.com/RaaLabs/certupdater"
|
||||
echo " * to install it as a docker image."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LE_CRT=$PWD/$FQDN/$FQDN.crt
|
||||
|
|
Loading…
Reference in a new issue