Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Dellear committed Mar 8, 2021
1 parent 9d0020e commit 9d36670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if [ ! -s ${JD_DIR}/config/auth.json ]; then
fi

echo -e "========================3. 启动挂机程序========================\n"
# 清空pm2日志
rm -rf /root/.pm2/logs/*
if [[ ${ENABLE_HANGUP} == true ]]; then
. ${JD_DIR}/config/config.sh
if [ -n "${Cookie1}" ]; then
Expand All @@ -63,7 +65,6 @@ elif [[ ${ENABLE_WEB_PANEL} == false ]]; then
echo -e "已设置为不自动启动控制面板,跳过...\n"
fi

pm2 flush
echo -e "容器启动成功...\n"

if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
Expand Down
2 changes: 1 addition & 1 deletion jd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ function Run_HangUp {
Import_Conf ${js} && Set_Env
if type pm2 >/dev/null 2>&1; then
pm2 stop ${js}.js 2>/dev/null
pm2 start -a ${js}.js --watch --ignore-watch="node_modules" --name="${js}"
pm2 flush
pm2 start -a ${js}.js --watch --ignore-watch="node_modules" --name="${js}"
else
Run_Nohup >/dev/null 2>&1
fi
Expand Down

0 comments on commit 9d36670

Please sign in to comment.