mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
Avoid usage of sed -e
This commit is contained in:
parent
2e5a6e21cf
commit
584cc6de2e
@ -37,7 +37,7 @@ telegram_send() {
|
|||||||
_telegram_bot_url="https://api.telegram.org/bot${TELEGRAM_BOT_APITOKEN}/sendMessage"
|
_telegram_bot_url="https://api.telegram.org/bot${TELEGRAM_BOT_APITOKEN}/sendMessage"
|
||||||
if _post "$_data" "$_telegram_bot_url"; then
|
if _post "$_data" "$_telegram_bot_url"; then
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
_message=$(printf "%s\n" "$response" | sed -ne 's/.*"ok":\([^,]*\).*/\1/p')
|
_message=$(printf "%s\n" "$response" | sed -n 's/.*"ok":\([^,]*\).*/\1/p')
|
||||||
if [ "$_message" = "true" ]; then
|
if [ "$_message" = "true" ]; then
|
||||||
_info "telegram send success."
|
_info "telegram send success."
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user