123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/bash
- nowdate=$1
- content=${@:2}
- content=${content//\<font color=\'red\'\>/}
- content=${content//\<\/font\>\<\/br\>/}
- content=${content//\ /}
- echo "warn content is : $content"
- api=https://open.feishu.cn/open-apis/bot/v2/hook/00cf9bb4-ecea-4f0d-bf02-1a20592a916c #飞书机器人webhook 地址
- curl -X POST \
- $api \
- -H 'Content-Type: application/json' \
- -d '{
- "msg_type": "post",
- "content": {
- "post": {
- "zh_cn": {
- "title": "recall alert",
- "content": [
- [
- {
- "tag": "text",
- "un_escape": true,
- "text": "'$content'"
- }
- ],
- [
- ]
- ]
- }
- }
- }
- }'
|