diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 39f110da..42256c9c 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -5,11 +5,9 @@ echo -e "======================1. 初始化命令========================\n" dir_shell=/ql/shell . $dir_shell/share.sh link_shell -echo echo -e "======================2. 更新源代码========================\n" ql update -echo echo -e "======================3. 检测配置文件========================\n" fix_config @@ -17,16 +15,15 @@ cp -fv $dir_root/docker/front.conf /etc/nginx/conf.d/front.conf echo -e "======================4. 启动nginx========================\n" nginx -c /etc/nginx/nginx.conf -echo echo -e "======================5. 启动控制面板========================\n" pm2 start $dir_root/build/app.js -n panel echo -e "控制面板启动成功...\n" -echo -e "\n容器启动成功...\n" -echo -e "\n请先访问5700端口,登录面板成功之后先手动执行一次git_pull命令...\n" -echo -e "\n如果需要启动挂机程序手动执行docker exec -it qinglong js hangup...\n" -echo -e "\n或者去cron管理搜索hangup手动执行挂机任务...\n" +echo -e "\n容器启动成功..." +echo -e "\n请先访问5700端口,登录面板成功之后先手动执行一次git_pull命令..." +echo -e "\n如果需要启动挂机程序手动执行docker exec -it qinglong js hangup..." +echo -e "\n或者去cron管理搜索hangup手动执行挂机任务..." crond -f diff --git a/shell/share.sh b/shell/share.sh index 69abe7fe..e400625f 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -67,8 +67,9 @@ import_config_and_check () { ## 创建目录,$1:目录的绝对路径 make_dir () { local dir=$1 - [ ! -d $dir ] && mkdir -p $dir - echo + if [[ ! -d $dir ]]; then + mkdir -p $dir + fi } ## 检测termux