NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[ACME] auto-create DNS-01 config template on startup

dcbea71e
FreddleSpl0it <[email protected]> 5 months ago
.gitignore                    |  1 +
 data/Dockerfiles/acme/acme.sh | 11 +++++++++++
 data/conf/acme/.gitkeep       |  0
 data/conf/acme/dns-101.conf   |  3 ---
 4 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100644 data/conf/acme/.gitkeep
 delete mode 100644 data/conf/acme/dns-101.conf

Diff

diff --git a/.gitignore b/.gitignore
index a06c3da7..416af9f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,7 @@ data/conf/sogo/cron.creds
 data/conf/sogo/custom-fulllogo.svg
 data/conf/sogo/custom-shortlogo.svg
 data/conf/sogo/custom-fulllogo.png
+data/conf/acme/dns-01.conf
 data/gitea/
 data/gogs/
 data/hooks/dovecot/*
diff --git a/data/Dockerfiles/acme/acme.sh b/data/Dockerfiles/acme/acme.sh
index 129d683e..c09569cd 100755
--- a/data/Dockerfiles/acme/acme.sh
+++ b/data/Dockerfiles/acme/acme.sh
@@ -14,6 +14,17 @@ until [[ $(${REDIS_CMDLINE} PING) == "PONG" ]]; do
   sleep 2
 done
 
+# Create DNS-01 configuration template if it doesn't exist
+if [[ ! -f /etc/acme/dns-01.conf ]]; then
+  mkdir -p /etc/acme
+  cat > /etc/acme/dns-01.conf <<'EOF'
+# Add here your DNS-01 challenge configuration
+# For more information, visit the acme.sh documentation:
+# https://github.com/acmesh-official/acme.sh/wiki/dnsapi
+EOF
+  echo "Created DNS-01 configuration template at /etc/acme/dns-01.conf"
+fi
+
 source /srv/functions.sh
 # Thanks to https://github.com/cvmiller -> https://github.com/cvmiller/expand6
 source /srv/expand6.sh
diff --git a/data/conf/acme/.gitkeep b/data/conf/acme/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/data/conf/acme/dns-101.conf b/data/conf/acme/dns-101.conf
deleted file mode 100644
index 095079ad..00000000
--- a/data/conf/acme/dns-101.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# Add here your DNS-01 challenge configuration
-# For more information, visit the acme.sh documentation:
-# https://github.com/acmesh-official/acme.sh/wiki/dnsapi