acme.sh 配置钉钉&Telegram通知

因为网站使用HSTS策略, 证书过期巨大影响, 有必要第一时间获知解证书更新情况

钉钉通知

创建钉钉群:test

  

https://image.coderlab.cn/preview/1505169632221286401

  

https://image.coderlab.cn/preview/1505169648474214402

  

https://image.coderlab.cn/preview/1505169663309467650

  

https://image.coderlab.cn/preview/1505169693051277314

  

https://image.coderlab.cn/preview/1505169722356879362

  

https://image.coderlab.cn/preview/1505169736642678786

  自定义关键词 . 或 acme 都可以

  

https://image.coderlab.cn/preview/1505169756305575938

给acme.sh 添加机器人配置

修改acme.sh 目录中的account.conf 文件,新增下面配置

1
2
3
export NOTIFY_LEVEL='3'
export DINGTALK_WEBHOOK='上面复制的Webhook'
export DINGTALK_KEYWORD=acme

效果测试

1
acme.sh  --set-notify  --notify-hook dingtalk

  

https://github.com/gclm/notion/blob/note/images/2021-12-24%2011-06-20/ec541fac-d9fb-4f98-8c33-98c2dd830d9a.png?raw=true

1
acme.sh --cron

  

https://image.coderlab.cn/preview/1505169756305575938

telegram通知.

@BotFather 申请机器人, /newbot 可获取TELEGRAM_BOT_APITOKEN

  

https://image.coderlab.cn/preview/1505169769165312002

  

https://image.coderlab.cn/preview/1505169769165312002

@userinfobot 输入 /start 可获取 TELEGRAM_BOT_CHATID

1
2
3
export NOTIFY_LEVEL='3'
export TELEGRAM_BOT_APITOKEN="..."
export TELEGRAM_BOT_CHATID="..."

  

https://image.coderlab.cn/preview/1505169790761783297

效果测试

1
2
3

acme.sh --set-notify --notify-hook telegram
acme.sh --cron