Skip to content

Commit 6785acc

Browse files
authored
Merge pull request #2 from xylz0928/patch-1
Add Title for crond content
2 parents 51fd185 + 26444dd commit 6785acc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

root/usr/bin/serverchand/serverchand

+1-1
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ function send(){
906906
local send_title=`echo "$send_title"|sed $'s/\ / /g'|sed $'s/\"/%22/g'|sed $'s/\#/%23/g'|sed $'s/\&/%26/g'|sed $'s/\,/%2C/g'|sed $'s/\//%2F/g'|sed $'s/\:/%3A/g'|sed $'s/\;/%3B/g'|sed $'s/\=/%3D/g'|sed $'s/\@/%40/g'`
907907
[ -z "$send_content" ] && local send_content="${markdown_splitline}#### <font color=#FF6666>我遇到了一个难题</font>${markdown_linefeed}${markdown_tab}定时发送选项错误,你没有选择需要发送的项目,该怎么办呢${markdown_splitline}"
908908
local nowtime=`date "+%Y-%m-%d %H:%M:%S"`
909-
serverchand_send="curl -s \"https://oapi.dingtalk.com/robot/send?access_token=${sckey}\" -H 'Content-Type: application/json' -d '{\"msgtype\": \"markdown\",\"markdown\": {\"title\":\"${send_title}\",\"text\":\"${nowtime}${markdown_linefeed}${send_content}\"}}'"
909+
serverchand_send="curl -s \"https://oapi.dingtalk.com/robot/send?access_token=${sckey}\" -H 'Content-Type: application/json' -d '{\"msgtype\": \"markdown\",\"markdown\": {\"title\":\"${send_title}\",\"text\":\"#### <font color=#6A65FF>${send_title}</font>${markdown_linefeed}${nowtime}${markdown_linefeed}${send_content}\"}}'"
910910
[ "$send_disturb" -eq "0" ] && [ -z "$send_tg" ] && eval $serverchand_send >/dev/null 2>&1
911911
[ "$send_disturb" -eq "0" ] && [ ! -z "$send_tg" ] && [ "$send_tg" -eq "1" ] && curl -d "text=${send_title}${markdown_linefeed}${nowtime}${markdown_linefeed}${send_content}" -X POST "${tgtoken}" >/dev/null 2>&1
912912
deltemp

0 commit comments

Comments
 (0)