Commit Graph

26 Commits

Author SHA1 Message Date
Sergey Ponomarev
6b7b5caf54 DNS provider API: structured description
Instead of using comments declare info in a special variable.
Then the variable can be used to print the DNS API provider usage.
The usage can be parsed on UI and show all needed inputs for options.

The info is stored in plain string that it's both human-readable and easy to parse:

    dns_example_info='API name
     An extended description.
     Multiline.
    Domains: list of alternative domains to find
    Site: the dns provider website e.g. example.com
    Docs: Link to ACME.sh wiki for the provider
    Options:
     VARIABLE1 Title for the option1.
     VARIABLE2 Title for the option2. Default "default value".
     VARIABLE3 Title for the option3. Description to show on UI. Optional.
    Issues: Link to a support ticket on https://github.com/acmesh-official/acme.sh
    Author: First Lastname <authoremail@example.com>, Another Author <https://github.com/example>;
    '

Here:
VARIABLE1 will be required.
VARIABLE2 will be required too but will be populated with a "default value".
VARIABLE3 is optional and can be empty.

A DNS provider may have alternative options like CloudFlare may use API KEY or API Token.
You can use a second section OptionsAlt: section.

Some providers may have alternative names or domains e.g. Aliyun and AlibabaCloud.
Add them to Domains: section.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2024-05-18 12:06:41 +03:00
neil
dd6c067832 fix format 2020-07-07 20:52:00 +08:00
Maarten den Braber
f03904ebce change to --output QUIET 2020-06-09 09:57:36 +02:00
Maarten den Braber
036a37e351 Nullify output from lexicon_cmd to prevent getting wrong return codes 2020-05-07 23:19:02 +02:00
neilpang
d795fac37a update repo name 2020-01-30 12:06:39 +08:00
Silvan Raijer
f174d7dd39
dns_lexicon.sh: Add extra variable _API_KEY 2020-01-05 15:27:04 +01:00
Jens Reimann
b23718f3ad Add support for additional Lexicon options 2018-08-21 11:51:26 +02:00
Oldřich Jedlička
4369402855 Cleaned-up shellcheck warnings. 2018-07-25 10:40:57 +02:00
Old?ich Jedli?ka
0366e8758c Added reading of stored config. 2018-07-24 22:41:43 +02:00
Old?ich Jedli?ka
8d230dd798 Added dns_lexicon_rm command.
Remove created TXT record when finished. Works with lexicon version 2.3.0
and later.
2018-07-24 16:30:47 +02:00
neilpang
e6e85b0c55 secure debug message 2017-02-19 13:24:00 +08:00
Bastian Bittorf
3ca93f4a4c shellcheck: fix several occurences of SC2034
message:
SC2034: $VARNAME appears unused. Verify it or export it.

most of these are related to the style:
we generate global vars, which are used in other functions.

the var "lexical_url" was really unused (left it as comment)

the travis-check now does not need anymore special flags.

Signed-off-by: Bastian Bittorf <bb@npl.de>
2017-01-13 14:54:09 +01:00
Bastian Bittorf
800f02ba38 dnsapi/dns_lexicon.sh: shellcheck: fix 4 occurences of SC2021:
"Don't use [] around ranges in tr, it replaces literal square brackets."

this introduces another warning:
"Use '[:lower:]' to support accents and foreign alphabets."

This is more a style thingy because we really want to only catch A-Z.
work around this by using a shellcheck-directive and a comment
that the [:lower:] will not work with e.g. busybox-ash.

if we later really want to use [:lower:], we should use 'sed' for that.
2017-01-09 12:21:32 +01:00
neilpang
a8c6111197 fix shellcheck warnings 2016-11-12 11:45:30 +08:00
neilpang
3de8570022 fix shellcheck warnings. 2016-11-12 11:40:30 +08:00
neilpang
a0311b0134 fix for shellcheck warnings 2016-11-12 11:35:19 +08:00
neilpang
422e5026d6 fix shellcheck warnings 2016-11-12 11:13:40 +08:00
neilpang
e9f9f515bd fix shellcheck warnings. 2016-11-12 00:06:34 +08:00
neilpang
c7b8f223ee fix for solaris tr 2016-11-11 23:48:27 +08:00
neilpang
a0636d5a87 fix shellcheck warnings. 2016-11-11 23:34:21 +08:00
neilpang
c7b16249b8 fix shellcheck warnings 2016-11-11 23:30:14 +08:00
neilpang
4c2a384159 Add shfmt to format source code 2016-11-09 19:30:39 +08:00
neilpang
5d6fd8099f add dns_xxx_rm function
https://github.com/Neilpang/acme.sh/issues/79
2016-10-25 23:08:02 +08:00
neil
bf233fbd48 minor 2016-06-07 13:05:27 +08:00
root
9bf69d30e0 exec mode 2016-05-08 09:19:17 +08:00
neil
218dc3390f support lexicon dns api 2016-05-08 18:20:56 +08:00