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
d53289d7
Commit
d53289d7
authored
Apr 11, 2016
by
neil
Browse files
Save customized account.conf.
parent
e8cce73a
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
d53289d7
...
@@ -662,8 +662,14 @@ _initpath() {
...
@@ -662,8 +662,14 @@ _initpath() {
LE_WORKING_DIR
=
$HOME
/.le
LE_WORKING_DIR
=
$HOME
/.le
fi
fi
_DEFAULT_ACCOUNT_CONF_PATH
=
"
$LE_WORKING_DIR
/account.conf"
if
[[
-f
"
$_DEFAULT_ACCOUNT_CONF_PATH
"
]]
;
then
source
"
$_DEFAULT_ACCOUNT_CONF_PATH
"
fi
if
[[
-z
"
$ACCOUNT_CONF_PATH
"
]]
;
then
if
[[
-z
"
$ACCOUNT_CONF_PATH
"
]]
;
then
ACCOUNT_CONF_PATH
=
"
$
LE_WORKING_DIR
/account.conf
"
ACCOUNT_CONF_PATH
=
"
$
_DEFAULT_ACCOUNT_CONF_PATH
"
fi
fi
if
[[
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
if
[[
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
...
@@ -1122,7 +1128,7 @@ issue() {
...
@@ -1122,7 +1128,7 @@ issue() {
fi
fi
addcommand
=
"
$_currentRoot
-add"
addcommand
=
"
$_currentRoot
-add"
if
!
command
-v
$addcommand
;
then
if
!
_exists
$addcommand
;
then
_err
"It seems that your api file is not correct, it must have a function named:
$addcommand
"
_err
"It seems that your api file is not correct, it must have a function named:
$addcommand
"
return
1
return
1
fi
fi
...
@@ -1605,8 +1611,11 @@ _detect_profile() {
...
@@ -1605,8 +1611,11 @@ _detect_profile() {
_initconf
()
{
_initconf
()
{
_initpath
_initpath
if
[[
!
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
if
[[
!
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
echo
"#Account configurations:
echo
"#ACCOUNT_CONF_PATH=xxxx
#Account configurations:
#Here are the supported macros, uncomment them to make them take effect.
#Here are the supported macros, uncomment them to make them take effect.
#ACCOUNT_EMAIL=aaa@aaa.com # the account email used to register account.
#ACCOUNT_EMAIL=aaa@aaa.com # the account email used to register account.
#ACCOUNT_KEY_PATH=
\"
/path/to/account.key
\"
#ACCOUNT_KEY_PATH=
\"
/path/to/account.key
\"
...
@@ -1726,12 +1735,16 @@ alias le.sh=\"$LE_WORKING_DIR/le.sh\"
...
@@ -1726,12 +1735,16 @@ alias le.sh=\"$LE_WORKING_DIR/le.sh\"
if
[[
-f
"
$LE_WORKING_DIR
/account.acc"
]]
;
then
if
[[
-f
"
$LE_WORKING_DIR
/account.acc"
]]
;
then
mv
"
$LE_WORKING_DIR
/account.acc"
"
$LE_WORKING_DIR
/account.key"
mv
"
$LE_WORKING_DIR
/account.acc"
"
$LE_WORKING_DIR
/account.key"
fi
fi
installcronjob
if
[[
!
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
if
[[
!
-f
"
$ACCOUNT_CONF_PATH
"
]]
;
then
_initconf
_initconf
fi
fi
_setopt
"
$_DEFAULT_ACCOUNT_CONF_PATH
"
"ACCOUNT_CONF_PATH"
"="
"
\"
$ACCOUNT_CONF_PATH
\"
"
_setopt
"
$ACCOUNT_CONF_PATH
"
"ACCOUNT_CONF_PATH"
"="
"
\"
$ACCOUNT_CONF_PATH
\"
"
installcronjob
_info OK
_info OK
}
}
...
...
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