mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
更新diy和通知脚本
This commit is contained in:
Regular → Executable
+3
-3
@@ -60,7 +60,7 @@ function addnewcron {
|
||||
[ -n "${change}" ] && \cp $js /jd/scripts/${author}_$js && echo -e "${author}_$js 脚本更新了."
|
||||
fi
|
||||
done
|
||||
[ "$addname" != "" ] notify "新增 ${author} 自定义脚本" "${addname}"
|
||||
[ "$addname" != "" ] && bash notify "新增 ${author} 自定义脚本" "${addname}"
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ function delcron {
|
||||
delname="${delname}\n${author}_${filename}"
|
||||
fi
|
||||
done
|
||||
[ "$delname" != "" ] && notify "删除 ${author} 失效脚本" "${delname}"
|
||||
[ "$delname" != "" ] && bash notify "删除 ${author} 失效脚本" "${delname}"
|
||||
}
|
||||
|
||||
if [[ ${gitpullstatus} -eq 0 ]]
|
||||
@@ -83,7 +83,7 @@ then
|
||||
delcron
|
||||
else
|
||||
echo -e "$author 仓库更新失败了."
|
||||
notify "自定义仓库更新失败" "$author"
|
||||
bash notify "自定义仓库更新失败" "$author"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
+3
-3
@@ -263,7 +263,7 @@ function Del_Cron {
|
||||
crontab -l
|
||||
echo -e "\n--------------------------------------------------------------\n"
|
||||
if [ -d ${ScriptsDir}/node_modules ]; then
|
||||
notify "删除 lxk0301 失效脚本" "${JsDrop}"
|
||||
bash notify "删除 lxk0301 失效脚本" "${JsDrop}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -296,12 +296,12 @@ function Add_Cron {
|
||||
crontab -l
|
||||
echo -e "\n--------------------------------------------------------------\n"
|
||||
if [ -d ${ScriptsDir}/node_modules ]; then
|
||||
notify "新增 lxk0301 自定义脚本" "${JsAdd}"
|
||||
bash notify "新增 lxk0301 自定义脚本" "${JsAdd}"
|
||||
fi
|
||||
else
|
||||
echo -e "添加新的定时任务出错,请手动添加...\n"
|
||||
if [ -d ${ScriptsDir}/node_modules ]; then
|
||||
notify "尝试自动添加 lxk0301 以下新的定时任务出错,请手动添加:" "${JsAdd}"
|
||||
bash notify "尝试自动添加 lxk0301 以下新的定时任务出错,请手动添加:" "${JsAdd}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const notify = require('../scripts/sendNotify');
|
||||
const notify = require('/jd/scripts/sendNotify');
|
||||
const title = process.argv[2];
|
||||
const content = process.argv[3];
|
||||
|
||||
|
||||
Regular → Executable
+1
-1
@@ -5,4 +5,4 @@
|
||||
title=$(echo $1|sed 's/-/_/g')
|
||||
msg=$(echo -e $2)
|
||||
|
||||
node /jd/shell/sendinfo.js "$title" "$msg"
|
||||
node /jd/shell/notify.js "$title" "$msg"
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
* @Last Modified time: 2020-12-20 13:51:02
|
||||
*/
|
||||
const $ = new Env('通知');
|
||||
const notify = require('./scripts/sendNotify');
|
||||
const notify = require('/jd/scripts/sendNotify');
|
||||
const fs = require('fs');
|
||||
!(async () => {
|
||||
await update();
|
||||
|
||||
Reference in New Issue
Block a user