mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-01-04 12:22:19 +08:00
Compare commits
97 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2e62f8e1d | ||
|
|
4da493f3f3 | ||
|
|
dec90f7e5e | ||
|
|
2ea5b283a8 | ||
|
|
eb23549cd6 | ||
|
|
cd90062850 | ||
|
|
3ec72fcee9 | ||
|
|
b9091e14b3 | ||
|
|
5daefc0194 | ||
|
|
44edb2bd2f | ||
|
|
201aa24448 | ||
|
|
e799ef2977 | ||
|
|
0c538f7527 | ||
|
|
ca7202eb0a | ||
|
|
d5ec5f80ff | ||
|
|
0c944a03fe | ||
|
|
79a267ab08 | ||
|
|
f9a6988ece | ||
|
|
95e06de5de | ||
|
|
f530a5074b | ||
|
|
439580b91b | ||
|
|
4c2a384159 | ||
|
|
cfd0b040e4 | ||
|
|
b001840dee | ||
|
|
20a6ab3d1a | ||
|
|
21f16b50f3 | ||
|
|
f58e83ee87 | ||
|
|
a9b4a2a1ac | ||
|
|
5be1449db5 | ||
|
|
37d7f89c6d | ||
|
|
57e58ce76c | ||
|
|
1d9f76e2c8 | ||
|
|
56e0269e5e | ||
|
|
662df85e54 | ||
|
|
2be4a5e486 | ||
|
|
a43d697225 | ||
|
|
f06c1e6c78 | ||
|
|
b5d1918401 | ||
|
|
d018be5d36 | ||
|
|
67184d7b20 | ||
|
|
dfdd48b990 | ||
|
|
cae9cee295 | ||
|
|
067d586c1c | ||
|
|
d22b7938da | ||
|
|
29b7510957 | ||
|
|
9d548d81ac | ||
|
|
3c33cdfa3d | ||
|
|
288485b209 | ||
|
|
1cbf416b10 | ||
|
|
3b46d3dd74 | ||
|
|
c243829234 | ||
|
|
fd80faa389 | ||
|
|
e7d4352292 | ||
|
|
610e0f21d6 | ||
|
|
7e512bad96 | ||
|
|
98c4ce0c45 | ||
|
|
93fc48a2db | ||
|
|
d7eea12a6f | ||
|
|
2a1e06f8a9 | ||
|
|
02d54a783a | ||
|
|
5961d44339 | ||
|
|
fb3be8509d | ||
|
|
97be53741d | ||
|
|
0d2c26735e | ||
|
|
2d0a8ddb58 | ||
|
|
72518d4827 | ||
|
|
c6cd744186 | ||
|
|
ae2db62f1c | ||
|
|
8c76b8bc36 | ||
|
|
18256c4923 | ||
|
|
f345cc66cf | ||
|
|
5dbf664a6b | ||
|
|
d7c6679d70 | ||
|
|
cae203be71 | ||
|
|
8a29fbc850 | ||
|
|
00bcbd367f | ||
|
|
1befee5aca | ||
|
|
5982f4bcf0 | ||
|
|
2399476a21 | ||
|
|
9e45ac939b | ||
|
|
34f231f9f3 | ||
|
|
f940b2a58e | ||
|
|
0383c33558 | ||
|
|
3afa4b210d | ||
|
|
998783eb9d | ||
|
|
5d6fd8099f | ||
|
|
800e3f4599 | ||
|
|
35c61f52fe | ||
|
|
3db446633c | ||
|
|
e3b4a0213c | ||
|
|
9910ff5fa1 | ||
|
|
049be10406 | ||
|
|
9aa3be7f9f | ||
|
|
aba5c634ae | ||
|
|
9774b01b0e | ||
|
|
ecf0a710e1 | ||
|
|
a61fe418b2 |
25
.github/ISSUE_TEMPLATE.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
If it is a bug report:
|
||||||
|
- make sure you are able to repro it on the latest released version.
|
||||||
|
You can install the latest version by: `acme.sh --upgrade`
|
||||||
|
|
||||||
|
- Search the existing issues.
|
||||||
|
- Refer to the [WIKI](https://wiki.acme.sh).
|
||||||
|
- Debug info [Debug](https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh).
|
||||||
|
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
Steps to reproduce
|
||||||
|
------------------
|
||||||
|
|
||||||
|
|
||||||
|
Debug log
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
```
|
||||||
|
acme.sh --issue ..... --debug 2
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
11
.travis.yml
Normal file
11
.travis.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
language: bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- SHFMT_URL=https://github.com/mvdan/sh/releases/download/v0.4.0/shfmt_v0.4.0_linux_amd64
|
||||||
|
|
||||||
|
script:
|
||||||
|
- curl -sSL $SHFMT_URL -o ~/shfmt
|
||||||
|
- chmod +x ~/shfmt
|
||||||
|
- ~/shfmt -l -w -i 2 .
|
||||||
|
- git diff --exit-code || (echo "Run shfmt to fix the formatting issues" && false)
|
||||||
26
README.md
26
README.md
@@ -1,4 +1,4 @@
|
|||||||
# An ACME Shell script: acme.sh
|
# An ACME Shell script: acme.sh [](https://travis-ci.org/Neilpang/acme.sh)
|
||||||
- An ACME protocol client written purely in Shell (Unix shell) language.
|
- An ACME protocol client written purely in Shell (Unix shell) language.
|
||||||
- Fully ACME protocol implementation.
|
- Fully ACME protocol implementation.
|
||||||
- Simple, powerful and very easy to use. You only need 3 minutes to learn.
|
- Simple, powerful and very easy to use. You only need 3 minutes to learn.
|
||||||
@@ -36,6 +36,7 @@ Wiki: https://github.com/Neilpang/acme.sh/wiki
|
|||||||
|16|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|Mageia
|
|16|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|Mageia
|
||||||
|17|-----| OpenWRT: Tested and working. See [wiki page](https://github.com/Neilpang/acme.sh/wiki/How-to-run-on-OpenWRT)
|
|17|-----| OpenWRT: Tested and working. See [wiki page](https://github.com/Neilpang/acme.sh/wiki/How-to-run-on-OpenWRT)
|
||||||
|18|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|SunOS/Solaris
|
|18|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|SunOS/Solaris
|
||||||
|
|19|[](https://github.com/Neilpang/letest#here-are-the-latest-status)|Gentoo Linux
|
||||||
|
|
||||||
For all build statuses, check our [daily build project](https://github.com/Neilpang/acmetest):
|
For all build statuses, check our [daily build project](https://github.com/Neilpang/acmetest):
|
||||||
|
|
||||||
@@ -137,15 +138,24 @@ More examples: https://github.com/Neilpang/acme.sh/wiki/How-to-issue-a-cert
|
|||||||
|
|
||||||
# 3. Install the issued cert to apache/nginx etc.
|
# 3. Install the issued cert to apache/nginx etc.
|
||||||
|
|
||||||
After you issue a cert, you probably want to install/copy the cert to your nginx/apache or other servers you may be using.
|
After you issue a cert, you probably want to install/copy the cert to your nginx/apache or other servers.
|
||||||
|
You **MUST** use this command to copy the certs to the target files, **Do NOT** use the certs files in **.acme.sh/** folder, they are for internal use only, the folder structure may change in future.
|
||||||
|
|
||||||
|
**nginx** example
|
||||||
```bash
|
```bash
|
||||||
acme.sh --installcert -d example.com \
|
acme.sh --installcert -d example.com \
|
||||||
--certpath /path/to/certfile/in/apache/nginx \
|
--keypath /path/to/keyfile/in/nginx/key.pem \
|
||||||
--keypath /path/to/keyfile/in/apache/nginx \
|
--fullchainpath path/to/fullchain/nginx/cert.pem \
|
||||||
--capath /path/to/ca/certfile/apache/nginx \
|
--reloadcmd "service nginx restart"
|
||||||
--fullchainpath path/to/fullchain/certfile/apache/nginx \
|
```
|
||||||
--reloadcmd "service apache2|nginx reload"
|
|
||||||
|
**apache** example
|
||||||
|
```bash
|
||||||
|
acme.sh --installcert -d example.com \
|
||||||
|
--certpath /path/to/certfile/in/apache/cert.pem \
|
||||||
|
--keypath /path/to/keyfile/in/apache/key.pem \
|
||||||
|
--fullchainpath path/to/fullchain/certfile/apache/fullchain.pem \
|
||||||
|
--reloadcmd "service apache2 restart"
|
||||||
```
|
```
|
||||||
|
|
||||||
Only the domain is required, all the other parameters are optional.
|
Only the domain is required, all the other parameters are optional.
|
||||||
@@ -244,6 +254,8 @@ You don't have do anything manually!
|
|||||||
7. PowerDNS API
|
7. PowerDNS API
|
||||||
8. lexicon dns api: https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api
|
8. lexicon dns api: https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api
|
||||||
(DigitalOcean, DNSimple, DnsMadeEasy, DNSPark, EasyDNS, Namesilo, NS1, PointHQ, Rage4 and Vultr etc.)
|
(DigitalOcean, DNSimple, DnsMadeEasy, DNSPark, EasyDNS, Namesilo, NS1, PointHQ, Rage4 and Vultr etc.)
|
||||||
|
9. LuaDNS.com API
|
||||||
|
10. DNSMadeEasy.com API
|
||||||
|
|
||||||
##### More APIs are coming soon...
|
##### More APIs are coming soon...
|
||||||
|
|
||||||
|
|||||||
28
deploy/myapi.sh
Normal file
28
deploy/myapi.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#Here is a sample custom api script.
|
||||||
|
#This file name is "myapi.sh"
|
||||||
|
#So, here must be a method myapi_deploy()
|
||||||
|
#Which will be called by acme.sh to deploy the cert
|
||||||
|
#returns 0 means success, otherwise error.
|
||||||
|
|
||||||
|
######## Public functions #####################
|
||||||
|
|
||||||
|
#domain keyfile certfile cafile fullchain
|
||||||
|
myapi_deploy() {
|
||||||
|
_cdomain="$1"
|
||||||
|
_ckey="$2"
|
||||||
|
_ccert="$3"
|
||||||
|
_cca="$4"
|
||||||
|
_cfullchain="$5"
|
||||||
|
|
||||||
|
_debug _cdomain "$_cdomain"
|
||||||
|
_debug _ckey "$_ckey"
|
||||||
|
_debug _ccert "$_ccert"
|
||||||
|
_debug _cca "$_cca"
|
||||||
|
_debug _cfullchain "$_cfullchain"
|
||||||
|
|
||||||
|
_err "Not implemented yet"
|
||||||
|
return 1
|
||||||
|
|
||||||
|
}
|
||||||
@@ -136,4 +136,41 @@ For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
|
|||||||
|
|
||||||
https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api
|
https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api
|
||||||
|
|
||||||
|
## Use LuaDNS domain API
|
||||||
|
|
||||||
|
Get your API token at https://api.luadns.com/settings
|
||||||
|
|
||||||
|
```
|
||||||
|
export LUA_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
|
|
||||||
|
export LUA_Email="xxxx@sss.com"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
To issue a cert:
|
||||||
|
```
|
||||||
|
acme.sh --issue --dns dns_lua --dnssleep 3 -d example.com -d www.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
The `LUA_Key` and `LUA_Email` will be saved in `~/.acme.sh/account.conf`, and will be reused when needed.
|
||||||
|
|
||||||
|
## Use DNSMadeEasy domain API
|
||||||
|
|
||||||
|
Get your API credentials at https://cp.dnsmadeeasy.com/account/info
|
||||||
|
|
||||||
|
```
|
||||||
|
export ME_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
|
|
||||||
|
export ME_Secret="qdfqsdfkjdskfj"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
To issue a cert:
|
||||||
|
```
|
||||||
|
acme.sh --issue --dns dns_me --dnssleep 3 -d example.com -d www.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
The `ME_Key` and `ME_Secret` will be saved in `~/.acme.sh/account.conf`, and will be reused when needed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
#CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
#
|
#
|
||||||
#CF_Email="xxxx@sss.com"
|
#CF_Email="xxxx@sss.com"
|
||||||
|
|
||||||
|
|
||||||
CF_Api="https://api.cloudflare.com/client/v4"
|
CF_Api="https://api.cloudflare.com/client/v4"
|
||||||
|
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
@@ -69,7 +67,7 @@ dns_cf_add(){
|
|||||||
_info "Updated, sleeping 10 seconds"
|
_info "Updated, sleeping 10 seconds"
|
||||||
sleep 10
|
sleep 10
|
||||||
#todo: check if the record takes effect
|
#todo: check if the record takes effect
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
_err "Update error"
|
_err "Update error"
|
||||||
return 1
|
return 1
|
||||||
@@ -77,9 +75,11 @@ dns_cf_add(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_cf_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
#_acme-challenge.www.domain.com
|
#_acme-challenge.www.domain.com
|
||||||
@@ -95,7 +95,7 @@ _get_root() {
|
|||||||
h=$(printf $domain | cut -d . -f $i-100)
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
if [ -z "$h" ]; then
|
if [ -z "$h" ]; then
|
||||||
#not valid
|
#not valid
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! _cf_rest GET "zones?name=$h"; then
|
if ! _cf_rest GET "zones?name=$h"; then
|
||||||
@@ -141,5 +141,3 @@ _cf_rest() {
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,8 @@
|
|||||||
#
|
#
|
||||||
#CX_Secret="sADDsdasdgdsf"
|
#CX_Secret="sADDsdasdgdsf"
|
||||||
|
|
||||||
|
|
||||||
CX_Api="https://www.cloudxns.net/api2"
|
CX_Api="https://www.cloudxns.net/api2"
|
||||||
|
|
||||||
|
|
||||||
#REST_API
|
#REST_API
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ dns_cx_add() {
|
|||||||
_saveaccountconf CX_Key "$CX_Key"
|
_saveaccountconf CX_Key "$CX_Key"
|
||||||
_saveaccountconf CX_Secret "$CX_Secret"
|
_saveaccountconf CX_Secret "$CX_Secret"
|
||||||
|
|
||||||
|
|
||||||
_debug "First detect the root zone"
|
_debug "First detect the root zone"
|
||||||
if ! _get_root $fulldomain; then
|
if ! _get_root $fulldomain; then
|
||||||
_err "invalid domain"
|
_err "invalid domain"
|
||||||
@@ -56,6 +53,12 @@ dns_cx_add() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_cx_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#usage: root sub
|
#usage: root sub
|
||||||
#return if the sub record already exists.
|
#return if the sub record already exists.
|
||||||
#echos the existing records count.
|
#echos the existing records count.
|
||||||
@@ -118,9 +121,6 @@ update_record() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
#_acme-challenge.www.domain.com
|
#_acme-challenge.www.domain.com
|
||||||
#returns
|
#returns
|
||||||
@@ -141,7 +141,7 @@ _get_root() {
|
|||||||
_debug h "$h"
|
_debug h "$h"
|
||||||
if [ -z "$h" ]; then
|
if [ -z "$h" ]; then
|
||||||
#not valid
|
#not valid
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if printf "$response" | grep "$h." >/dev/null; then
|
if printf "$response" | grep "$h." >/dev/null; then
|
||||||
@@ -164,7 +164,6 @@ _get_root() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#Usage: method URI data
|
#Usage: method URI data
|
||||||
_rest() {
|
_rest() {
|
||||||
m=$1
|
m=$1
|
||||||
@@ -205,5 +204,3 @@ _rest() {
|
|||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,8 @@
|
|||||||
#
|
#
|
||||||
#DP_Key="sADDsdasdgdsf"
|
#DP_Key="sADDsdasdgdsf"
|
||||||
|
|
||||||
|
|
||||||
DP_Api="https://dnsapi.cn"
|
DP_Api="https://dnsapi.cn"
|
||||||
|
|
||||||
|
|
||||||
#REST_API
|
#REST_API
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ dns_dp_add() {
|
|||||||
_saveaccountconf DP_Id "$DP_Id"
|
_saveaccountconf DP_Id "$DP_Id"
|
||||||
_saveaccountconf DP_Key "$DP_Key"
|
_saveaccountconf DP_Key "$DP_Key"
|
||||||
|
|
||||||
|
|
||||||
_debug "First detect the root zone"
|
_debug "First detect the root zone"
|
||||||
if ! _get_root $fulldomain; then
|
if ! _get_root $fulldomain; then
|
||||||
_err "invalid domain"
|
_err "invalid domain"
|
||||||
@@ -51,6 +48,12 @@ dns_dp_add() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_dp_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#usage: root sub
|
#usage: root sub
|
||||||
#return if the sub record already exists.
|
#return if the sub record already exists.
|
||||||
#echos the existing records count.
|
#echos the existing records count.
|
||||||
@@ -65,7 +68,7 @@ existing_records() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if printf "$response" | grep 'No records'; then
|
if printf "$response" | grep 'No records'; then
|
||||||
count=0;
|
count=0
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -78,7 +81,6 @@ existing_records() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +103,6 @@ add_record() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
return 1 #error
|
return 1 #error
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,9 +128,6 @@ update_record() {
|
|||||||
return 1 #error
|
return 1 #error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
#_acme-challenge.www.domain.com
|
#_acme-challenge.www.domain.com
|
||||||
#returns
|
#returns
|
||||||
@@ -144,7 +142,7 @@ _get_root() {
|
|||||||
h=$(printf $domain | cut -d . -f $i-100)
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
if [ -z "$h" ]; then
|
if [ -z "$h" ]; then
|
||||||
#not valid
|
#not valid
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! _rest POST "Domain.Info" "login_token=$DP_Id,$DP_Key&format=json&domain=$h"; then
|
if ! _rest POST "Domain.Info" "login_token=$DP_Id,$DP_Key&format=json&domain=$h"; then
|
||||||
@@ -169,7 +167,6 @@ _get_root() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#Usage: method URI data
|
#Usage: method URI data
|
||||||
_rest() {
|
_rest() {
|
||||||
m=$1
|
m=$1
|
||||||
@@ -194,5 +191,3 @@ _rest() {
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#
|
#
|
||||||
#GD_Secret="asdfsdfsfsdfsdfdfsdf"
|
#GD_Secret="asdfsdfsfsdfsdfdfsdf"
|
||||||
|
|
||||||
|
|
||||||
GD_Api="https://api.godaddy.com/v1"
|
GD_Api="https://api.godaddy.com/v1"
|
||||||
|
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
@@ -35,7 +34,6 @@ dns_gd_add(){
|
|||||||
_debug _sub_domain "$_sub_domain"
|
_debug _sub_domain "$_sub_domain"
|
||||||
_debug _domain "$_domain"
|
_debug _domain "$_domain"
|
||||||
|
|
||||||
|
|
||||||
_info "Adding record"
|
_info "Adding record"
|
||||||
if _gd_rest PUT "domains/$_domain/records/TXT/$_sub_domain" "[{\"data\":\"$txtvalue\"}]"; then
|
if _gd_rest PUT "domains/$_domain/records/TXT/$_sub_domain" "[{\"data\":\"$txtvalue\"}]"; then
|
||||||
if [ "$response" = "{}" ]; then
|
if [ "$response" = "{}" ]; then
|
||||||
@@ -53,9 +51,11 @@ dns_gd_add(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_gd_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
#_acme-challenge.www.domain.com
|
#_acme-challenge.www.domain.com
|
||||||
@@ -71,7 +71,7 @@ _get_root() {
|
|||||||
h=$(printf $domain | cut -d . -f $i-100)
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
if [ -z "$h" ]; then
|
if [ -z "$h" ]; then
|
||||||
#not valid
|
#not valid
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! _gd_rest GET "domains/$h"; then
|
if ! _gd_rest GET "domains/$h"; then
|
||||||
@@ -114,5 +114,3 @@ _gd_rest() {
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,5 +65,8 @@ dns_lexicon_add() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_lexicon_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
141
dnsapi/dns_lua.sh
Executable file
141
dnsapi/dns_lua.sh
Executable file
@@ -0,0 +1,141 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# bug reports to dev@1e.ca
|
||||||
|
|
||||||
|
#
|
||||||
|
#LUA_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
|
#
|
||||||
|
#LUA_Email="user@luadns.net"
|
||||||
|
|
||||||
|
LUA_Api="https://api.luadns.com/v1"
|
||||||
|
LUA_auth=$(printf $LUA_Email:$LUA_Key | _base64)
|
||||||
|
|
||||||
|
######## Public functions #####################
|
||||||
|
|
||||||
|
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
|
||||||
|
dns_lua_add() {
|
||||||
|
fulldomain=$1
|
||||||
|
txtvalue=$2
|
||||||
|
|
||||||
|
if [ -z "$LUA_Key" ] || [ -z "$LUA_Email" ]; then
|
||||||
|
_err "You don't specify luadns api key and email yet."
|
||||||
|
_err "Please create you key and try again."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#save the api key and email to the account conf file.
|
||||||
|
_saveaccountconf LUA_Key "$LUA_Key"
|
||||||
|
_saveaccountconf LUA_Email "$LUA_Email"
|
||||||
|
|
||||||
|
_debug "First detect the root zone"
|
||||||
|
if ! _get_root $fulldomain; then
|
||||||
|
_err "invalid domain"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug _domain_id "$_domain_id"
|
||||||
|
_debug _sub_domain "$_sub_domain"
|
||||||
|
_debug _domain "$_domain"
|
||||||
|
|
||||||
|
_debug "Getting txt records"
|
||||||
|
_LUA_rest GET "zones/${_domain_id}/records"
|
||||||
|
|
||||||
|
if ! printf "$response" | grep \"id\": >/dev/null; then
|
||||||
|
_err "Error"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
count=$(printf "%s\n" "$response" | _egrep_o \"name\":\"$fulldomain\" | wc -l)
|
||||||
|
_debug count "$count"
|
||||||
|
if [ "$count" = "0" ]; then
|
||||||
|
_info "Adding record"
|
||||||
|
if _LUA_rest POST "zones/$_domain_id/records" "{\"type\":\"TXT\",\"name\":\"$fulldomain.\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
||||||
|
if printf -- "%s" "$response" | grep $fulldomain >/dev/null; then
|
||||||
|
_info "Added"
|
||||||
|
#todo: check if the record takes effect
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
_err "Add txt record error."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
_err "Add txt record error."
|
||||||
|
else
|
||||||
|
_info "Updating record"
|
||||||
|
record_id=$(printf "%s\n" "$response" | _egrep_o \"id\":[^,]*,\"name\":\"$fulldomain.\",\"type\":\"TXT\" | cut -d: -f2 | cut -d, -f1)
|
||||||
|
_debug "record_id" $record_id
|
||||||
|
|
||||||
|
_LUA_rest PUT "zones/$_domain_id/records/$record_id" "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain.\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"ttl\":120}"
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
_info "Updated!"
|
||||||
|
#todo: check if the record takes effect
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
_err "Update error"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_lua_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#################### Private functions bellow ##################################
|
||||||
|
#_acme-challenge.www.domain.com
|
||||||
|
#returns
|
||||||
|
# _sub_domain=_acme-challenge.www
|
||||||
|
# _domain=domain.com
|
||||||
|
# _domain_id=sdjkglgdfewsdfg
|
||||||
|
_get_root() {
|
||||||
|
domain=$1
|
||||||
|
i=2
|
||||||
|
p=1
|
||||||
|
if ! _LUA_rest GET "zones"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
while [ '1' ]; do
|
||||||
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
|
if [ -z "$h" ]; then
|
||||||
|
#not valid
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if printf $response | grep \"name\":\"$h\" >/dev/null; then
|
||||||
|
_domain_id=$(printf "%s\n" "$response" | _egrep_o \"id\":[^,]*,\"name\":\"$h\" | cut -d : -f 2 | cut -d , -f 1)
|
||||||
|
if [ "$_domain_id" ]; then
|
||||||
|
_sub_domain=$(printf $domain | cut -d . -f 1-$p)
|
||||||
|
_domain=$h
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
p=$i
|
||||||
|
i=$(expr $i + 1)
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_LUA_rest() {
|
||||||
|
m=$1
|
||||||
|
ep="$2"
|
||||||
|
data="$3"
|
||||||
|
_debug $ep
|
||||||
|
|
||||||
|
_H1="Accept: application/json"
|
||||||
|
_H2="Authorization: Basic $LUA_auth"
|
||||||
|
if [ "$data" ]; then
|
||||||
|
_debug data "$data"
|
||||||
|
response="$(_post "$data" "$LUA_Api/$ep" "" $m)"
|
||||||
|
else
|
||||||
|
response="$(_get "$LUA_Api/$ep")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
_err "error $ep"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug2 response "$response"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
144
dnsapi/dns_me.sh
Executable file
144
dnsapi/dns_me.sh
Executable file
@@ -0,0 +1,144 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# bug reports to dev@1e.ca
|
||||||
|
|
||||||
|
# ME_Key=qmlkdjflmkqdjf
|
||||||
|
# ME_Secret=qmsdlkqmlksdvnnpae
|
||||||
|
|
||||||
|
ME_Api=https://api.dnsmadeeasy.com/V2.0/dns/managed
|
||||||
|
|
||||||
|
######## Public functions #####################
|
||||||
|
|
||||||
|
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
|
||||||
|
dns_me_add() {
|
||||||
|
fulldomain=$1
|
||||||
|
txtvalue=$2
|
||||||
|
|
||||||
|
if [ -z "$ME_Key" ] || [ -z "$ME_Secret" ]; then
|
||||||
|
_err "You didn't specify DNSMadeEasy api key and secret yet."
|
||||||
|
_err "Please create you key and try again."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#save the api key and email to the account conf file.
|
||||||
|
_saveaccountconf ME_Key "$ME_Key"
|
||||||
|
_saveaccountconf ME_Secret "$ME_Secret"
|
||||||
|
|
||||||
|
_debug "First detect the root zone"
|
||||||
|
if ! _get_root $fulldomain; then
|
||||||
|
_err "invalid domain"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug _domain_id "$_domain_id"
|
||||||
|
_debug _sub_domain "$_sub_domain"
|
||||||
|
_debug _domain "$_domain"
|
||||||
|
|
||||||
|
_debug "Getting txt records"
|
||||||
|
_me_rest GET "${_domain_id}/records?recordName=$_sub_domain&type=TXT"
|
||||||
|
|
||||||
|
if ! printf "$response" | grep \"totalRecords\": >/dev/null; then
|
||||||
|
_err "Error"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
count=$(printf "%s\n" "$response" | _egrep_o \"totalRecords\":[^,]* | cut -d : -f 2)
|
||||||
|
_debug count "$count"
|
||||||
|
if [ "$count" = "0" ]; then
|
||||||
|
_info "Adding record"
|
||||||
|
if _me_rest POST "$_domain_id/records/" "{\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"gtdLocation\":\"DEFAULT\",\"ttl\":120}"; then
|
||||||
|
if printf -- "%s" "$response" | grep \"id\": >/dev/null; then
|
||||||
|
_info "Added"
|
||||||
|
#todo: check if the record takes effect
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
_err "Add txt record error."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
_err "Add txt record error."
|
||||||
|
else
|
||||||
|
_info "Updating record"
|
||||||
|
record_id=$(printf "%s\n" "$response" | _egrep_o \"id\":[^,]* | cut -d : -f 2 | head -n 1)
|
||||||
|
_debug "record_id" $record_id
|
||||||
|
|
||||||
|
_me_rest PUT "$_domain_id/records/$record_id/" "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$_sub_domain\",\"value\":\"$txtvalue\",\"gtdLocation\":\"DEFAULT\",\"ttl\":120}"
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
_info "Updated"
|
||||||
|
#todo: check if the record takes effect
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
_err "Update error"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_me_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#################### Private functions bellow ##################################
|
||||||
|
#_acme-challenge.www.domain.com
|
||||||
|
#returns
|
||||||
|
# _sub_domain=_acme-challenge.www
|
||||||
|
# _domain=domain.com
|
||||||
|
# _domain_id=sdjkglgdfewsdfg
|
||||||
|
_get_root() {
|
||||||
|
domain=$1
|
||||||
|
i=2
|
||||||
|
p=1
|
||||||
|
while [ '1' ]; do
|
||||||
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
|
if [ -z "$h" ]; then
|
||||||
|
#not valid
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! _me_rest GET "name?domainname=$h"; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if printf $response | grep \"name\":\"$h\" >/dev/null; then
|
||||||
|
_domain_id=$(printf "%s\n" "$response" | _egrep_o \"id\":[^,]* | head -n 1 | cut -d : -f 2)
|
||||||
|
if [ "$_domain_id" ]; then
|
||||||
|
_sub_domain=$(printf $domain | cut -d . -f 1-$p)
|
||||||
|
_domain=$h
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
p=$i
|
||||||
|
i=$(expr $i + 1)
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_me_rest() {
|
||||||
|
m=$1
|
||||||
|
ep="$2"
|
||||||
|
data="$3"
|
||||||
|
_debug $ep
|
||||||
|
|
||||||
|
cdate=$(date -u +"%a, %d %b %Y %T %Z")
|
||||||
|
hmac=$(printf "$cdate" | _hmac sha1 "$ME_Secret" 1)
|
||||||
|
|
||||||
|
_H1="x-dnsme-apiKey: $ME_Key"
|
||||||
|
_H2="x-dnsme-requestDate: $cdate"
|
||||||
|
_H3="x-dnsme-hmac: $hmac"
|
||||||
|
|
||||||
|
if [ "$data" ]; then
|
||||||
|
_debug data "$data"
|
||||||
|
response="$(_post "$data" "$ME_Api/$ep" "" $m)"
|
||||||
|
else
|
||||||
|
response="$(_get "$ME_Api/$ep")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
_err "error $ep"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug2 response "$response"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
#Which will be called by acme.sh to add the txt record to your api system.
|
#Which will be called by acme.sh to add the txt record to your api system.
|
||||||
#returns 0 means success, otherwise error.
|
#returns 0 means success, otherwise error.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
|
|
||||||
#Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
|
#Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
|
||||||
@@ -15,12 +13,14 @@ dns_myapi_add() {
|
|||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
_err "Not implemented!"
|
_err "Not implemented!"
|
||||||
return 1;
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_myapi_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
_info() {
|
_info() {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
|
||||||
#Applcation Key
|
#Applcation Key
|
||||||
#OVH_AK="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
#OVH_AK="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
#
|
#
|
||||||
@@ -10,10 +9,8 @@
|
|||||||
#Consumer Key
|
#Consumer Key
|
||||||
#OVH_CK="sdfsdfsdfsdfsdfdsf"
|
#OVH_CK="sdfsdfsdfsdfsdfdsf"
|
||||||
|
|
||||||
|
|
||||||
#OVH_END_POINT=ovh-eu
|
#OVH_END_POINT=ovh-eu
|
||||||
|
|
||||||
|
|
||||||
#'ovh-eu'
|
#'ovh-eu'
|
||||||
OVH_EU='https://eu.api.ovh.com/1.0'
|
OVH_EU='https://eu.api.ovh.com/1.0'
|
||||||
|
|
||||||
@@ -35,13 +32,10 @@ SYS_CA='https://ca.api.soyoustart.com/1.0'
|
|||||||
#'runabove-ca'
|
#'runabove-ca'
|
||||||
RAV_CA='https://api.runabove.com/1.0'
|
RAV_CA='https://api.runabove.com/1.0'
|
||||||
|
|
||||||
|
|
||||||
wiki="https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api"
|
wiki="https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api"
|
||||||
|
|
||||||
ovh_success="https://github.com/Neilpang/acme.sh/wiki/OVH-Success"
|
ovh_success="https://github.com/Neilpang/acme.sh/wiki/OVH-Success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_ovh_get_api() {
|
_ovh_get_api() {
|
||||||
_ogaep="$1"
|
_ogaep="$1"
|
||||||
|
|
||||||
@@ -76,8 +70,8 @@ _ovh_get_api() {
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
||||||
_err "Unknown parameter : $1"
|
_err "Unknown parameter : $1"
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
@@ -101,7 +95,6 @@ dns_ovh_add(){
|
|||||||
_saveaccountconf OVH_AK "$OVH_AK"
|
_saveaccountconf OVH_AK "$OVH_AK"
|
||||||
_saveaccountconf OVH_AS "$OVH_AS"
|
_saveaccountconf OVH_AS "$OVH_AS"
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$OVH_END_POINT" ]; then
|
if [ -z "$OVH_END_POINT" ]; then
|
||||||
OVH_END_POINT="ovh-eu"
|
OVH_END_POINT="ovh-eu"
|
||||||
fi
|
fi
|
||||||
@@ -119,10 +112,9 @@ dns_ovh_add(){
|
|||||||
_err "Can not get consumer key."
|
_err "Can not get consumer key."
|
||||||
fi
|
fi
|
||||||
#return and wait for retry.
|
#return and wait for retry.
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
_info "Checking authentication"
|
_info "Checking authentication"
|
||||||
|
|
||||||
response="$(_ovh_rest GET "domain/")"
|
response="$(_ovh_rest GET "domain/")"
|
||||||
@@ -173,7 +165,7 @@ dns_ovh_add(){
|
|||||||
_debug "Refresh:$response"
|
_debug "Refresh:$response"
|
||||||
_info "Updated, sleeping 10 seconds"
|
_info "Updated, sleeping 10 seconds"
|
||||||
sleep 10
|
sleep 10
|
||||||
return 0;
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
_err "Update error"
|
_err "Update error"
|
||||||
@@ -182,6 +174,11 @@ dns_ovh_add(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_ovh_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#################### Private functions bellow ##################################
|
#################### Private functions bellow ##################################
|
||||||
|
|
||||||
@@ -220,7 +217,6 @@ _ovh_authentication() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#_acme-challenge.www.domain.com
|
#_acme-challenge.www.domain.com
|
||||||
#returns
|
#returns
|
||||||
# _sub_domain=_acme-challenge.www
|
# _sub_domain=_acme-challenge.www
|
||||||
@@ -234,7 +230,7 @@ _get_root() {
|
|||||||
h=$(printf $domain | cut -d . -f $i-100)
|
h=$(printf $domain | cut -d . -f $i-100)
|
||||||
if [ -z "$h" ]; then
|
if [ -z "$h" ]; then
|
||||||
#not valid
|
#not valid
|
||||||
return 1;
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! _ovh_rest GET "domain/zone/$h"; then
|
if ! _ovh_rest GET "domain/zone/$h"; then
|
||||||
@@ -267,7 +263,6 @@ _ovh_rest() {
|
|||||||
data="$3"
|
data="$3"
|
||||||
_debug $ep
|
_debug $ep
|
||||||
|
|
||||||
|
|
||||||
_ovh_url="$OVH_API/$ep"
|
_ovh_url="$OVH_API/$ep"
|
||||||
_debug2 _ovh_url "$_ovh_url"
|
_debug2 _ovh_url "$_ovh_url"
|
||||||
_ovh_t="$(_ovh_timestamp)"
|
_ovh_t="$(_ovh_timestamp)"
|
||||||
@@ -277,7 +272,6 @@ _ovh_rest() {
|
|||||||
_ovh_hex="$(printf "%s" "$_ovh_p" | _digest sha1 hex)"
|
_ovh_hex="$(printf "%s" "$_ovh_p" | _digest sha1 hex)"
|
||||||
_debug2 _ovh_hex "$_ovh_hex"
|
_debug2 _ovh_hex "$_ovh_hex"
|
||||||
|
|
||||||
|
|
||||||
_H1="X-Ovh-Application: $OVH_AK"
|
_H1="X-Ovh-Application: $OVH_AK"
|
||||||
_H2="X-Ovh-Signature: \$1\$$_ovh_hex"
|
_H2="X-Ovh-Signature: \$1\$$_ovh_hex"
|
||||||
_debug2 _H2 "$_H2"
|
_debug2 _H2 "$_H2"
|
||||||
@@ -298,5 +292,3 @@ _ovh_rest() {
|
|||||||
_debug2 response "$response"
|
_debug2 response "$response"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,12 @@ dns_pdns_add() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#fulldomain
|
||||||
|
dns_pdns_rm() {
|
||||||
|
fulldomain=$1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
set_record() {
|
set_record() {
|
||||||
_info "Adding record"
|
_info "Adding record"
|
||||||
root=$1
|
root=$1
|
||||||
|
|||||||
Reference in New Issue
Block a user