17 lines
449 B
Bash
17 lines
449 B
Bash
|
|
#!/bin/bash
|
||
|
|
# Server酱³ 推送脚本
|
||
|
|
# 用法: ./notify.sh "标题" "内容(Markdown格式)" "标签"
|
||
|
|
|
||
|
|
WEBHOOK_URL="https://18679.push.ft07.com/send/sctp18679t1r3njnm44jsbryh6h8nuw8.send"
|
||
|
|
TITLE="$1"
|
||
|
|
DESP="$2"
|
||
|
|
TAG="$3"
|
||
|
|
|
||
|
|
# 构建 JSON 数据 - 使用 title 和 desp 字段
|
||
|
|
JSON_DATA="{\"title\":\"$TITLE\",\"desp\":\"$DESP\",\"tags\":\"$TAG\"}"
|
||
|
|
|
||
|
|
# 发送请求
|
||
|
|
curl -X POST "$WEBHOOK_URL" \
|
||
|
|
-H "Content-Type: application/json" \
|
||
|
|
-d "$JSON_DATA"
|