Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
bf233fbd
Commit
bf233fbd
authored
Jun 07, 2016
by
neil
Browse files
minor
parent
cc7fdbd6
Changes
2
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_lexicon.sh
View file @
bf233fbd
...
...
@@ -67,43 +67,3 @@ dns_lexicon_add() {
#################### Private functions bellow ##################################
_info
()
{
if
[[
-z
"
$2
"
]]
;
then
echo
"[
$(
date
)
]
$1
"
else
echo
"[
$(
date
)
]
$1
"
=
"'
$2
'"
fi
}
_err
()
{
_info
"
$@
"
>
&2
return
1
}
_debug
()
{
if
[[
-z
"
$DEBUG
"
]]
;
then
return
fi
_err
"
$@
"
return
0
}
_debug2
()
{
if
[[
"
$DEBUG
"
-ge
"2"
]]
;
then
_debug
"
$@
"
fi
return
}
#################### Private functions bellow ##################################
dnsapi/dns_myapi.sh
View file @
bf233fbd
...
...
@@ -2,15 +2,15 @@
#Here is a sample custom api script.
#This file name is "dns_myapi.sh"
#So, here must be a method dns_myapi
-
add()
#So, here must be a method dns_myapi
_
add()
#Which will be called by acme.sh to add the txt record to your api system.
#returns 0 means
t
success, otherwise error.
#returns 0 means success, otherwise error.
######## Public functions #####################
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
#Usage:
dns_myapi_
add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_myapi_add
()
{
fulldomain
=
$1
txtvalue
=
$2
...
...
@@ -22,16 +22,12 @@ dns_myapi_add() {
#################### Private functions bellow ##################################
_info
()
{
if
[
[
-z
"
$2
"
]
]
;
then
if
[
-z
"
$2
"
]
;
then
echo
"[
$(
date
)
]
$1
"
else
echo
"[
$(
date
)
]
$1
"
=
"
'
$2
'"
echo
"[
$(
date
)
]
$1
=
'
$2
'"
fi
}
...
...
@@ -41,7 +37,7 @@ _err() {
}
_debug
()
{
if
[
[
-z
"
$DEBUG
"
]
]
;
then
if
[
-z
"
$DEBUG
"
]
;
then
return
fi
_err
"
$@
"
...
...
@@ -49,14 +45,8 @@ _debug() {
}
_debug2
()
{
if
[[
"
$DEBUG
"
-ge
"2"
]
]
;
then
if
[
"
$DEBUG
"
]
&&
[
"
$DEBUG
"
-ge
"2"
]
;
then
_debug
"
$@
"
fi
return
}
\ No newline at end of file
#################### Private functions bellow ##################################
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment