This commit is contained in:
iouAkira
2021-03-26 16:55:48 +08:00
parent 58bdf795eb
commit f6b5bd90af
2 changed files with 16 additions and 10 deletions

View File

@@ -112,6 +112,9 @@ EOF
fi
echo "暂停更新配置,不要尝试删掉这个文件,你的容器可能会起不来"
echo '' >/scripts/logs/pull.lock
echo "定义定时任务合并处理用到的文件路径..."
defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE"
echo "默认文件定时任务文件路径为 ${defaultListFile}"
@@ -246,4 +249,4 @@ cat /scripts/docker/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh
echo "发送通知"
export NOTIFY_CONTENT="2021-03-21更新 增加bot交互spnode指令功能是否开启自动根据你的配置判断详见 https://gitee.com/lxk0301/jd_docker/pulls/18"
cd /scripts/docker
node notify_docker_user.js
node notify_docker_user.js

View File

@@ -6,15 +6,18 @@ if [ -n "$1" ]; then
run_cmd=$1
fi
echo "设定远程仓库地址..."
cd /scripts
git remote set-url origin "$REPO_URL"
git reset --hard
echo "git pull拉取最新代码..."
git -C /scripts pull --rebase
echo "npm install 安装最新依赖"
npm install --prefix /scripts
if [ -f "/scripts/logs/pull.lock" ]; then
echo "存在更新锁定文件跳过git pull操作..."
else
echo "设定远程仓库地址..."
cd /scripts
git remote set-url origin "$REPO_URL"
git reset --hard
echo "git pull拉取最新代码..."
git -C /scripts pull --rebase
echo "npm install 安装最新依赖"
npm install --prefix /scripts
fi
# 默认启动telegram交互机器人的条件
# 确认容器启动时调用的docker_entrypoint.sh