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
9bf37fde
Commit
9bf37fde
authored
Apr 29, 2022
by
AlvinSchiller
Committed by
Marvo2011
May 03, 2022
Browse files
Added variable checks
parent
1054325b
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_selfhost.sh
View file @
9bf37fde
...
@@ -19,6 +19,11 @@ dns_selfhost_add() {
...
@@ -19,6 +19,11 @@ dns_selfhost_add() {
SELFHOSTDNS_RID2
=
"
${
SELFHOSTDNS_RID2
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID2
)
}
"
SELFHOSTDNS_RID2
=
"
${
SELFHOSTDNS_RID2
:-
$(
_readaccountconf_mutable SELFHOSTDNS_RID2
)
}
"
SELFHOSTDNS_LAST_SLOT
=
"
$(
_readaccountconf_mutable SELFHOSTDNS_LAST_SLOT
)
"
SELFHOSTDNS_LAST_SLOT
=
"
$(
_readaccountconf_mutable SELFHOSTDNS_LAST_SLOT
)
"
if
[
-z
"
${
SELFHOSTDNS_USERNAME
:-}
"
]
||
[
-z
"
${
SELFHOSTDNS_PASSWORD
:-}
"
]
;
then
_err
"SELFHOSTDNS_USERNAME and SELFHOSTDNS_PASSWORD must be set"
return
1
fi
if
test
-z
"
$SELFHOSTDNS_LAST_SLOT
"
;
then
if
test
-z
"
$SELFHOSTDNS_LAST_SLOT
"
;
then
SELFHOSTDNS_LAST_SLOT
=
1
SELFHOSTDNS_LAST_SLOT
=
1
fi
fi
...
@@ -41,6 +46,11 @@ dns_selfhost_add() {
...
@@ -41,6 +46,11 @@ dns_selfhost_add() {
fi
fi
fi
fi
if
test
-z
"
$rid
"
;
then
_err
"SELFHOSTDNS_RID and SELFHOSTDNS_RID2, or SELFHOSTDNS_MAP must be set"
return
1
fi
_saveaccountconf_mutable SELFHOSTDNS_LAST_SLOT
"
$SELFHOSTDNS_LAST_SLOT
"
_saveaccountconf_mutable SELFHOSTDNS_LAST_SLOT
"
$SELFHOSTDNS_LAST_SLOT
"
_info
"Trying to add
$txt
on selfhost for rid:
$rid
"
_info
"Trying to add
$txt
on selfhost for rid:
$rid
"
...
...
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