This commit is contained in:
anonymous 2021-04-07 20:52:26 +08:00
parent 77a3c5f905
commit 57794c8547
2 changed files with 18 additions and 19 deletions

9
docker/docker-entrypoint.sh Executable file → Normal file
View File

@ -2,7 +2,7 @@
set -e set -e
echo -e "======================1. 更新源代码========================\n" echo -e "======================1. 更新源代码========================\n"
update update ql
echo echo
echo -e "======================2. 检测配置文件========================\n" echo -e "======================2. 检测配置文件========================\n"
@ -11,9 +11,8 @@ echo -e "======================2. 检测配置文件========================\n"
if [ ! -s ${QL_DIR}/config/crontab.list ] if [ ! -s ${QL_DIR}/config/crontab.list ]
then then
echo -e "检测到config配置目录下不存在crontab.list或存在但文件为空从示例文件复制一份用于初始化...\n" echo -e "检测到config配置目录下不存在crontab.list或存在但文件为空从示例文件复制一份用于初始化...\n"
cp -fv ${QL_DIR}/sample/crontab.list.sample ${QL_DIR}/config/crontab.list cp -fv ${QL_DIR}/sample/crontab.sample.list ${QL_DIR}/config/crontab.list
sed -i "s,MY_PATH,${QL_DIR},g" ${QL_DIR}/config/crontab.list perl -i -pe "{s|CMD_UPDATE|update|g; s|CMD_REBUILD|rebuild|g; s|CMD_RMLOG|rmlog|g; s|CMD_TASK|task|g; s|CMD_MYTASK|mytask|g}" ${QL_DIR}/config/crontab.list
sed -i "s,ENV_PATH=,PATH=$PATH,g" ${QL_DIR}/config/crontab.list
fi fi
crontab ${QL_DIR}/config/crontab.list crontab ${QL_DIR}/config/crontab.list
echo -e "成功添加定时任务...\n" echo -e "成功添加定时任务...\n"
@ -26,7 +25,7 @@ fi
if [ ! -s ${QL_DIR}/config/config.sh ]; then if [ ! -s ${QL_DIR}/config/config.sh ]; then
echo -e "检测到config配置目录下不存在config.sh从示例文件复制一份用于初始化...\n" echo -e "检测到config配置目录下不存在config.sh从示例文件复制一份用于初始化...\n"
cp -fv ${QL_DIR}/sample/config.sh.sample ${QL_DIR}/config/config.sh cp -fv ${QL_DIR}/sample/config.sample.sh ${QL_DIR}/config/config.sh
echo echo
fi fi

View File

@ -1,5 +1,5 @@
# 更新qinglong # 更新所有脚本
55 2,13 * * * CMD_UPDATE 55 2,13 * * * CMD_UPDATE all
# 重新build面板 # 重新build面板
# 30 7 */7 * * CMD_REBUILD >> ${QL_DIR}/log/rebuild.log 2>&1 # 30 7 */7 * * CMD_REBUILD >> ${QL_DIR}/log/rebuild.log 2>&1