From eccebba5193852a18c90bbf6ac4c9287dd8ca989 Mon Sep 17 00:00:00 2001 From: Michael Porter Date: Thu, 15 Mar 2018 14:39:18 +0000 Subject: [PATCH] Add script to provide dev shell --- dev/dev_shell.sh | 7 +++++++ dev/readme.txt | 1 + dev/tools/initfile.sh | 4 ++++ 3 files changed, 12 insertions(+) create mode 100755 dev/dev_shell.sh create mode 100644 dev/readme.txt create mode 100644 dev/tools/initfile.sh diff --git a/dev/dev_shell.sh b/dev/dev_shell.sh new file mode 100755 index 0000000..cb0329f --- /dev/null +++ b/dev/dev_shell.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" +PROJ_DIR="$(dirname "$SCRIPT_DIR")" + +docker run -it --rm --entrypoint /bin/sh -e GANDI_API_KEY -v "$PROJ_DIR:/tmp/work" certbot/certbot:v0.22.0 '/tmp/work/dev/tools/initfile.sh' diff --git a/dev/readme.txt b/dev/readme.txt new file mode 100644 index 0000000..25f4fde --- /dev/null +++ b/dev/readme.txt @@ -0,0 +1 @@ +Set env var GANDI_API_KEY to your GANDI LiveDNS API key and run ./dev_shell.sh to get a shell with certbot ready to run with the plugin installed. diff --git a/dev/tools/initfile.sh b/dev/tools/initfile.sh new file mode 100644 index 0000000..5ddd570 --- /dev/null +++ b/dev/tools/initfile.sh @@ -0,0 +1,4 @@ +pip install -e /tmp/work/plugin +printf 'certbot_plugin_gandi:dns_api_key=%s\n' $GANDI_API_KEY > /tmp/config.ini && chmod 400 /tmp/config.ini +echo 'Example: certbot certonly --test-cert -a certbot-plugin-gandi:dns --certbot-plugin-gandi:dns-credentials /tmp/config.ini -d domain.com' +exec /bin/sh