Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ciphax committed Mar 1, 2019
1 parent 7ebe5fd commit fe1db06
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ FROM certbot/certbot:rolling
VOLUME /etc/letsencrypt
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/letsencrypt-inwx /usr/bin/
COPY etc/* /usr/lib/letsencrypt-inwx/
RUN chmod +x /usr/lib/letsencrypt-inwx/*

ENTRYPOINT ["/bin/sh", "/usr/lib/letsencrypt-inwx/docker-entrypoint.sh"]
ENTRYPOINT ["/usr/lib/letsencrypt-inwx/docker-entrypoint.sh"]
2 changes: 1 addition & 1 deletion etc/certbot-inwx-auth
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CONFIG_PATH=/etc/letsencrypt-inwx.json

if [ -f ~/.config/letsencrypt-inwx-cred ]; then
if [ -f ~/.config/letsencrypt-inwx.json ]; then
CONFIG_PATH=~/.config/letsencrypt-inwx.json
fi

Expand Down
2 changes: 1 addition & 1 deletion etc/certbot-inwx-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CONFIG_PATH=/etc/letsencrypt-inwx.json

if [ -f ~/.config/letsencrypt-inwx-cred ]; then
if [ -f ~/.config/letsencrypt-inwx.json ]; then
CONFIG_PATH=~/.config/letsencrypt-inwx.json
fi

Expand Down
8 changes: 5 additions & 3 deletions etc/docker-entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh

CONF_CREATED=false

if [ ! -z "$INWX_USER" -a ! -z "$INWX_PASSWD" ]; then
Expand All @@ -7,21 +9,21 @@ if [ ! -z "$INWX_USER" -a ! -z "$INWX_PASSWD" ]; then
PASSING INWX_USER AND INWX_PASSWD AS ENV VARIABLES IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE!
You should mount a config file into the container instead. See https://github.com/kegato/letsencrypt-inwx for details.
"
cat << EOF > /etc/letsencrypt-inwx.conf
cat << EOF > /etc/letsencrypt-inwx.json
{
"accounts": [{
"username": "$INWX_USER",
"password": "$INWX_PASSWD"
}]
}
EOF
chmod 600 /etc/letsencrypt-inwx.conf
chmod 600 /etc/letsencrypt-inwx.json
fi

set -x
certbot -n --agree-tos --server https://acme-v02.api.letsencrypt.org/directory $@
set +x

if [ $CONF_CREATED = true ]; then
rm /etc/letsencrypt-inwx.conf
rm /etc/letsencrypt-inwx.json
fi

0 comments on commit fe1db06

Please sign in to comment.