|
|
|
@ -43,8 +43,16 @@ convertio_apikey=`cat $config_file | jq -r .convertio.apikey` |
|
|
|
|
|
|
|
|
|
CronitorKey=`cat $config_file | jq -r .Cronitor.API_KEY` |
|
|
|
|
CronitorJobName=`cat $config_file | jq -r .Cronitor.JOB_NAME` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
basePath=`cat $config_file|jq -r .basePath` |
|
|
|
|
if [ ! -f $basePath ] |
|
|
|
|
then |
|
|
|
|
mkdir -p $basePath |
|
|
|
|
fi |
|
|
|
|
# ================================================ |
|
|
|
|
|
|
|
|
|
cd $basePath |
|
|
|
|
if [ ! -f $db_file ] |
|
|
|
|
then |
|
|
|
|
touch $db_file |
|
|
|
@ -168,12 +176,7 @@ function Request(){ |
|
|
|
|
done |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
basePath=`cat $config_file|jq -r .basePath` |
|
|
|
|
if [ ! -f $basePath ] |
|
|
|
|
then |
|
|
|
|
mkdir -p $basePath |
|
|
|
|
fi |
|
|
|
|
cd $basePath |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
telegramToken=`cat $config_file | jq -r .telegramToken` |
|
|
|
|
baseApi="https://api.telegram.org/bot$telegramToken" |
|
|
|
@ -389,5 +392,5 @@ done |
|
|
|
|
next_expected_at=`curl -v https://cronitor.io/api/monitors/$CronitorJobName -u $CronitorKey:''|jq .next_expected_at` |
|
|
|
|
Request "curl -v -d chat_id=$chat_id -d text=\"以上就是$today日榜前${length}名作品,本次推送完毕,下次推送时间预计是`date -d @$next_expected_at '+%Y-%m-%d %H:%M:%S'`,如有问题请联系管理员。 #date$_today #日期$_today \" $baseApi/sendMessage" |
|
|
|
|
|
|
|
|
|
find -type f -mtime +7 -name "*.webp" -o -name "*.html" -o -name "*.info" -o -name "*.json" -not -name $config_file|xargs rm -f |
|
|
|
|
find -type f -mtime +7 -name "*.webp" -o -name "*.html" -o -name "*.info" -o -name "*.json" -not -name `basename $config_file`|xargs rm -f |
|
|
|
|
DeleteMultipleObjects |