From 5c44c190607cc2d5c05b28a4f52f4c8971ad1ffc Mon Sep 17 00:00:00 2001 From: redxef Date: Tue, 13 Apr 2021 21:09:00 +0200 Subject: [PATCH] Add command hook. --- Dockerfile | 9 ++++----- certbot-duckdns | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27f99c5..020ccfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ FROM alpine:latest -RUN apk update && apk upgrade \ - && apk add \ - curl \ - certbot \ - openssl +RUN apk add \ + curl \ + certbot \ + openssl RUN mkdir -p /etc/periodic/12h \ && mkdir -p /etc/periodic/5min diff --git a/certbot-duckdns b/certbot-duckdns index d265818..4a06d4f 100755 --- a/certbot-duckdns +++ b/certbot-duckdns @@ -11,3 +11,7 @@ certbot certonly --manual --preferred-challenges dns-01 --keep \ --agree-tos --no-eff-email --manual-public-ip-logging-ok \ --manual-auth-hook=certbot-auth --manual-cleanup-hook=certbot-cleanup \ "$@" + +if [ -n "$COMMAND" ]; then + /usr/bin/env sh -c "$COMMAND" +fi