mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-25 00:16:06 +08:00
修复diy命令无法跳出
This commit is contained in:
parent
09498766dd
commit
a7a6fdd350
|
@ -60,7 +60,7 @@ function addnewcron {
|
|||
script_date=`cat $js|grep ^[0-9]|awk '{print $1,$2,$3,$4,$5}'|egrep -v "[a-zA-Z]|:|\."|sort |uniq|head -n 1`
|
||||
[ -z "${script_date}" ] && script_date=`cat $js|grep -Eo "([0-9]+|\*|[0-9]+[,-].*) ([0-9]+|\*|[0-9]+[,-].*) ([0-9]+|\*|[0-9]+[,-].*) ([0-9]+|\*|[0-9]+[,-].*) ([0-9]+|\*|[0-9][,-].*)"|sort |uniq|head -n 1`
|
||||
[ -z "${script_date}" ] && cron_min=$(rand 1 59) && cron_hour=$(rand 7 9) && script_date="${cron_min} ${cron_hour} * * *"
|
||||
[ $(grep -c -w "$croname" /ql/config/crontab.list) -eq 0 ] && sed -i "/hangup/a${script_date} js $croname" /ql/config/crontab.list && addname="${addname}\n${croname}" && echo -e "添加了新的脚本${croname}." && js ${croname} now >/dev/null &
|
||||
[ $(grep -c -w "$croname" /ql/config/crontab.list) -eq 0 ] && sed -i "/hangup/a${script_date} js $croname" /ql/config/crontab.list && addname="${addname}\n${croname}" && echo -e "添加了新的脚本${croname}."
|
||||
if [ ! -f "/ql/scripts/${author}_$base" ];then
|
||||
\cp $js /ql/scripts/${author}_$base
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user