mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改 ql update 逻辑
This commit is contained in:
parent
89d9357a8a
commit
a49d471204
|
@ -256,14 +256,18 @@ update_qinglong() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local url="https://gitee.com/whyour/qinglong-static.git"
|
local url="https://gitee.com/whyour/qinglong-static.git"
|
||||||
rm -rf ${ql_static_repo}
|
if [ -d ${ql_static_repo}/.git ]; then
|
||||||
|
reset_romote_url ${ql_static_repo} ${url}
|
||||||
|
git_pull_scripts ${ql_static_repo}
|
||||||
|
else
|
||||||
git_clone_scripts ${url} ${ql_static_repo}
|
git_clone_scripts ${url} ${ql_static_repo}
|
||||||
|
fi
|
||||||
if [[ $exit_status -eq 0 ]]; then
|
if [[ $exit_status -eq 0 ]]; then
|
||||||
echo -e "\n更新$ql_static_repo成功...\n"
|
echo -e "\n更新$ql_static_repo成功...\n"
|
||||||
cp -rf $ql_static_repo/* $dir_root
|
cp -rf $ql_static_repo/* $dir_root
|
||||||
echo -e "重启面板中..."
|
echo -e "重启面板中..."
|
||||||
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
|
||||||
sleep 1 && pm2 reload all >/dev/null 2>&1
|
pm2 reload all >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo -e "\n更新$dir_root失败,请检查原因...\n"
|
echo -e "\n更新$dir_root失败,请检查原因...\n"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user