1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

Added force renew certificate (#781)

This commit is contained in:
dcertskc
2020-06-17 08:05:35 -05:00
committed by GitHub
parent 48d166e80e
commit 5977803e3b
4 changed files with 55 additions and 0 deletions

View File

@ -148,6 +148,16 @@ function updateLetsEncrypt() {
fi
}
function forceupdateLetsEncrypt() {
if [ -d "${OUTPUT_DIR}/letsencrypt/live" ]
then
docker pull certbot/certbot
docker run -i --rm --name certbot -p 443:443 -p 80:80 \
-v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \
renew --logs-dir /etc/letsencrypt/logs --force-renew
fi
}
function updateDatabase() {
pullSetup
dockerComposeFiles
@ -183,6 +193,14 @@ function restart() {
printEnvironment
}
function certrestart() {
dockerComposeDown
dockerComposePull
forceupdateLetsEncrypt
dockerComposeUp
printEnvironment
}
function pullSetup() {
docker pull bitwarden/setup:$COREVERSION
}
@ -201,6 +219,9 @@ then
elif [ "$1" == "stop" ]
then
dockerComposeDown
elif [ "$1" == "renewcert" ]
then
certrestart
elif [ "$1" == "updateconf" ]
then
dockerComposeDown