mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 20:55:27 +00:00
Prevent leaving blank lines in config file after cleared keys.
This commit is contained in:
parent
aa8cf76fb1
commit
bd3a2b1bb5
2
acme.sh
2
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user