Browse Source
Prevent leaving blank lines in config file after cleared keys.
pull/5029/head
Scruel Tao
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
acme.sh
|
@ -2351,7 +2351,7 @@ _clear_conf() { |
|
|
_sdkey="$2" |
|
|
_sdkey="$2" |
|
|
if [ "$_c_c_f" ]; then |
|
|
if [ "$_c_c_f" ]; then |
|
|
_conf_data="$(cat "$_c_c_f")" |
|
|
_conf_data="$(cat "$_c_c_f")" |
|
|
echo "$_conf_data" | sed "s/^$_sdkey *=.*$//" >"$_c_c_f" |
|
|
|
|
|
|
|
|
echo "$_conf_data" | sed "/^$_sdkey *=.*$/d" >"$_c_c_f" |
|
|
else |
|
|
else |
|
|
_err "config file is empty, can not clear" |
|
|
_err "config file is empty, can not clear" |
|
|
fi |
|
|
fi |
|
|