mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
dev
This commit is contained in:
parent
77a3c5f905
commit
57794c8547
33
docker/docker-entrypoint.sh
Executable file → Normal file
33
docker/docker-entrypoint.sh
Executable file → Normal 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"
|
||||||
|
@ -10,36 +10,35 @@ 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"
|
||||||
|
|
||||||
if [ ! -s ${QL_DIR}/config/cookie.sh ]; then
|
if [ ! -s ${QL_DIR}/config/cookie.sh ]; then
|
||||||
echo -e "检测到config配置目录下不存在cookie.sh,从示例文件复制一份用于初始化...\n"
|
echo -e "检测到config配置目录下不存在cookie.sh,从示例文件复制一份用于初始化...\n"
|
||||||
touch ${QL_DIR}/config/cookie.sh
|
touch ${QL_DIR}/config/cookie.sh
|
||||||
echo
|
echo
|
||||||
fi
|
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
|
||||||
|
|
||||||
if [ ! -s ${QL_DIR}/config/auth.sample.json ]; then
|
if [ ! -s ${QL_DIR}/config/auth.sample.json ]; then
|
||||||
echo -e "检测到config配置目录下不存在auth.json,从示例文件复制一份用于初始化...\n"
|
echo -e "检测到config配置目录下不存在auth.json,从示例文件复制一份用于初始化...\n"
|
||||||
cp -fv ${QL_DIR}/sample/auth.sample.json ${QL_DIR}/config/auth.json
|
cp -fv ${QL_DIR}/sample/auth.sample.json ${QL_DIR}/config/auth.json
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s /etc/nginx/conf.d/default.conf ]; then
|
if [ -s /etc/nginx/conf.d/default.conf ]; then
|
||||||
echo -e "检测到默认nginx配置文件,删除...\n"
|
echo -e "检测到默认nginx配置文件,删除...\n"
|
||||||
rm -f /etc/nginx/conf.d/default.conf
|
rm -f /etc/nginx/conf.d/default.conf
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp -fv ${QL_DIR}/docker/front.conf /etc/nginx/conf.d/front.conf
|
cp -fv ${QL_DIR}/docker/front.conf /etc/nginx/conf.d/front.conf
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user