Skip to content

Commit

Permalink
U push_notify.sh _disk_notify_global.example: add backend wework
Browse files Browse the repository at this point in the history
  • Loading branch information
yurenchen000 committed Oct 26, 2024
1 parent cd9bae3 commit 71a62c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions _disk_notify_global.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ DINGTALK_BOT_TOKEN='your dingtalk bot token (uuid) here'
## don't turn on signature
## https://open.dingtalk.com/document/orgapp/obtain-the-webhook-address-of-a-custom-robot

push_backend='wework'
WEWORK_BOT_KEY='your wework bot key (uuid) here'
## note: can't send msg to wechat
## https://developer.work.weixin.qq.com/document/path/99110


## backend can set multi channels now
push_backend='wxpusher pushplus'
Expand Down
6 changes: 4 additions & 2 deletions push_notify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ do_push_notify(){
case "$backend" in
telegram) do_push_telegram "$tit" "$msg";;
feishu) do_push_feishu "$tit" "$msg";;
wework) do_push_wework "$tit" "$msg";;
dingtalk) do_push_dingtalk "$tit" "$msg";;
pushplus) do_push_pushplus "$tit" "$msg";;
wxpusher) do_push_wxpusher "$tit" "$msg";;
serverchan) do_push_serverchan "$tit" "$msg";;
*) echo 'choose a push backend by set PUSH_BACKEND';;
*) echo 'choose a push backend by set push_backend in conf';;
esac
done

Expand All @@ -33,11 +34,12 @@ load_push_impl(){
case "$backend" in
telegram) source $dir/push_impl.telegram.sh;;
feishu) source $dir/push_impl.feishu.sh;;
wework) source $dir/push_impl.wework.sh;;
dingtalk) source $dir/push_impl.dingtalk.sh;;
pushplus) source $dir/push_impl.pushplus.sh;;
wxpusher) source $dir/push_impl.wxpusher.sh;;
serverchan) source $dir/push_impl.serverchan.sh;;
*) echo 'choose a push backend by set PUSH_BACKEND';;
*) echo 'choose push backend by set push_backend in conf';;
esac
done
}
Expand Down

0 comments on commit 71a62c3

Please sign in to comment.