增加gotify推送

This commit is contained in:
wwd
2025-11-24 22:02:25 +08:00
parent d47d425160
commit 1868853b77
2 changed files with 31 additions and 0 deletions

View File

@@ -148,6 +148,12 @@ logger() { #日志工具
content="{\"token\":\"${push_PP}\",\"title\":\"ShellCrash日志推送\",\"content\":\"$log_text\"}"
webpush "$url" "$content" &
}
# 新增Gotify推送
[ -n "$push_Gotify" ] && {
url="${push_Gotify}"
content="{\"title\":\"ShellCrash日志推送\",\"message\":\"$log_text\",\"priority\":5}"
webpush "$url" "$content" &
}
[ -n "$push_SynoChat" ] && {
url="${push_ChatURL}/webapi/entry.cgi?api=SYNO.Chat.External&method=chatbot&version=2&token=${push_ChatTOKEN}"
content="payload={\"text\":\"${log_text}\", \"user_ids\":[${push_ChatUSERID}]}"