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
a7d61461
Commit
a7d61461
authored
Mar 05, 2019
by
Miodrag Tokić
Browse files
Extract configuration saving code to function
parent
978ec911
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_loopia.sh
View file @
a7d61461
...
...
@@ -18,9 +18,7 @@ dns_loopia_add() {
return
1
fi
#save the api key and email to the account conf file.
_saveaccountconf_mutable LOOPIA_User
"
$LOOPIA_User
"
_saveaccountconf_mutable LOOPIA_Password
"
$LOOPIA_Password
"
_loopia_save_config
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
...
...
@@ -45,9 +43,7 @@ dns_loopia_rm() {
return
1
fi
#save the api key and email to the account conf file.
_saveaccountconf_mutable LOOPIA_User
"
$LOOPIA_User
"
_saveaccountconf_mutable LOOPIA_Password
"
$LOOPIA_Password
"
_loopia_save_config
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
...
...
@@ -101,6 +97,11 @@ _loopia_load_config() {
return
0
}
_loopia_save_config
()
{
_saveaccountconf_mutable LOOPIA_User
"
$LOOPIA_User
"
_saveaccountconf_mutable LOOPIA_Password
"
$LOOPIA_Password
"
}
_loopia_get_records
()
{
domain
=
$1
sub_domain
=
$2
...
...
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