1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,18 @@ |
1 |
+#!/bin/sh |
|
2 |
+set -euC |
|
3 |
+ |
|
4 |
+# This is a naive guess. A better implementation would use e.g. the Public |
|
5 |
+# Suffix List. |
|
6 |
+re='\(\(.*\)\.\)\?\([^.]\+\.[^.]\+\)' |
|
7 |
+domain="$(echo "$CERTBOT_DOMAIN" | sed -n "s/$re/\3/p")" |
|
8 |
+name="$(echo "$CERTBOT_DOMAIN" | sed -n "s/$re/\2/p")" |
|
9 |
+ |
|
10 |
+name="_acme-challenge${name:+".$name"}" |
|
11 |
+data="$CERTBOT_VALIDATION" |
|
12 |
+ |
|
13 |
+dir="$(cd "$(dirname "$0")" ; pwd)" |
|
14 |
+ |
|
15 |
+"$dir/nfsn-send" "POST" "/dns/$domain/removeRR" \ |
|
16 |
+ "name" "$name" \ |
|
17 |
+ "type" "TXT" \ |
|
18 |
+ "data" "$data" |