mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
luci-app-jd-dailybonus: sync upstream (#8647)
Co-authored-by: jerrykuku <jerrykuku@qq.com>
This commit is contained in:
parent
d63edcce3b
commit
0497bf2ee8
@ -54,6 +54,12 @@ o = s:option(Value, 'dd_token', translate('Dingding Bot Token'))
|
||||
o.rmempty = true
|
||||
o.description = translate('创建一个群机器人并获取API Token,设置安全关键字为:京东')
|
||||
|
||||
-- pushplus
|
||||
|
||||
o = s:option(Value, 'pp_token', translate('pushplus Token'))
|
||||
o.rmempty = true
|
||||
o.description = translate('微信推送,基于pushplus服务,请自行登录 https://www.pushplus.plus/ 绑定并获取 Token。')
|
||||
|
||||
-- telegram
|
||||
|
||||
o = s:option(Value, 'tg_token', translate('Telegram Bot Token'))
|
||||
|
@ -6,8 +6,8 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
USE_PROCD=1
|
||||
START=25
|
||||
STOP=10
|
||||
|
||||
NAME=jd-dailybonus
|
||||
CRON_FILE=/etc/crontabs/root
|
||||
|
@ -86,6 +86,13 @@ notify() {
|
||||
uclient-fetch -q --post-file=/tmp/jd-djson.json "https://oapi.dingtalk.com/robot/send?access_token=${dtoken}"
|
||||
fi
|
||||
|
||||
#pushplus
|
||||
ptoken=$(uci_get_by_type global pp_token)
|
||||
POST_URL="http://www.pushplus.plus/send"
|
||||
if [ ! -z $ptoken ]; then
|
||||
curl -s -d "{\"token\":\"$ptoken\",\"title\":\"$title\",\"content\":\"$desc\"}" -H 'Content-Type: application/json' $POST_URL
|
||||
fi
|
||||
|
||||
#telegram
|
||||
TG_BOT_TOKEN=$(uci_get_by_type global tg_token)
|
||||
TG_USER_ID=$(uci_get_by_type global tg_userid)
|
||||
|
Loading…
Reference in New Issue
Block a user