mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
Update install.sh
This commit is contained in:
parent
ab5b6eddf0
commit
90cf54f681
@ -363,9 +363,18 @@ restart_and_update() {
|
|||||||
echo -e "> 重启并更新面板"
|
echo -e "> 重启并更新面板"
|
||||||
|
|
||||||
cd $NZ_DASHBOARD_PATH
|
cd $NZ_DASHBOARD_PATH
|
||||||
|
|
||||||
|
docker compose version
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose down
|
docker compose down
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
else
|
||||||
|
docker-compose pull
|
||||||
|
docker-compose down
|
||||||
|
docker-compose up -d
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
echo -e "${green}哪吒监控 重启成功${plain}"
|
echo -e "${green}哪吒监控 重启成功${plain}"
|
||||||
echo -e "默认管理面板地址:${yellow}域名:站点访问端口${plain}"
|
echo -e "默认管理面板地址:${yellow}域名:站点访问端口${plain}"
|
||||||
@ -381,7 +390,13 @@ restart_and_update() {
|
|||||||
start_dashboard() {
|
start_dashboard() {
|
||||||
echo -e "> 启动面板"
|
echo -e "> 启动面板"
|
||||||
|
|
||||||
|
docker compose version
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
cd $NZ_DASHBOARD_PATH && docker compose up -d
|
cd $NZ_DASHBOARD_PATH && docker compose up -d
|
||||||
|
else
|
||||||
|
cd $NZ_DASHBOARD_PATH && docker-compose up -d
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
echo -e "${green}哪吒监控 启动成功${plain}"
|
echo -e "${green}哪吒监控 启动成功${plain}"
|
||||||
else
|
else
|
||||||
@ -396,7 +411,13 @@ start_dashboard() {
|
|||||||
stop_dashboard() {
|
stop_dashboard() {
|
||||||
echo -e "> 停止面板"
|
echo -e "> 停止面板"
|
||||||
|
|
||||||
|
docker compose version
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
cd $NZ_DASHBOARD_PATH && docker compose down
|
cd $NZ_DASHBOARD_PATH && docker compose down
|
||||||
|
else
|
||||||
|
cd $NZ_DASHBOARD_PATH && docker-compose down
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
echo -e "${green}哪吒监控 停止成功${plain}"
|
echo -e "${green}哪吒监控 停止成功${plain}"
|
||||||
else
|
else
|
||||||
@ -411,7 +432,12 @@ stop_dashboard() {
|
|||||||
show_dashboard_log() {
|
show_dashboard_log() {
|
||||||
echo -e "> 获取面板日志"
|
echo -e "> 获取面板日志"
|
||||||
|
|
||||||
|
docker compose version
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
cd $NZ_DASHBOARD_PATH && docker compose logs -f
|
cd $NZ_DASHBOARD_PATH && docker compose logs -f
|
||||||
|
else
|
||||||
|
cd $NZ_DASHBOARD_PATH && docker-compose logs -f
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $# == 0 ]]; then
|
if [[ $# == 0 ]]; then
|
||||||
before_show_menu
|
before_show_menu
|
||||||
@ -421,7 +447,13 @@ show_dashboard_log() {
|
|||||||
uninstall_dashboard() {
|
uninstall_dashboard() {
|
||||||
echo -e "> 卸载管理面板"
|
echo -e "> 卸载管理面板"
|
||||||
|
|
||||||
|
docker compose version
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
cd $NZ_DASHBOARD_PATH && docker compose down
|
cd $NZ_DASHBOARD_PATH && docker compose down
|
||||||
|
else
|
||||||
|
cd $NZ_DASHBOARD_PATH && docker-compose down
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf $NZ_DASHBOARD_PATH
|
rm -rf $NZ_DASHBOARD_PATH
|
||||||
docker rmi -f ghcr.io/naiba/nezha-dashboard > /dev/null 2>&1
|
docker rmi -f ghcr.io/naiba/nezha-dashboard > /dev/null 2>&1
|
||||||
docker rmi -f registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard > /dev/null 2>&1
|
docker rmi -f registry.cn-shanghai.aliyuncs.com/naibahq/nezha-dashboard > /dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user