mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
installer: fix docker-compose detection (#427)
This commit is contained in:
parent
318da135b9
commit
c4d8b63d32
@ -4,7 +4,7 @@
|
||||
<br>
|
||||
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
|
||||
<br><br>
|
||||
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&style=for-the-badge&logo=github&label=Dashboard"> <img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.19.0-brightgreen?style=for-the-badge&logo=linux">
|
||||
<img alt="GitHub release (with filter)" src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&style=for-the-badge&logo=github&label=Dashboard"> <img src="https://img.shields.io/github/v/release/nezhahq/agent?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/actions/workflow/status/nezhahq/agent/agent.yml?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.19.1-brightgreen?style=for-the-badge&logo=linux">
|
||||
<br>
|
||||
<br>
|
||||
<p>:trollface: <b>Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.</b></p>
|
||||
|
@ -12,7 +12,7 @@ NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
|
||||
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
|
||||
NZ_DASHBOARD_SERVICE="/etc/systemd/system/nezha-dashboard.service"
|
||||
NZ_DASHBOARD_SERVICERC="/etc/init.d/nezha-dashboard"
|
||||
NZ_VERSION="v0.19.0"
|
||||
NZ_VERSION="v0.19.1"
|
||||
|
||||
red='\033[0;31m'
|
||||
green='\033[0;32m'
|
||||
@ -65,6 +65,8 @@ geo_check() {
|
||||
}
|
||||
|
||||
pre_check() {
|
||||
umask 077
|
||||
|
||||
## os_arch
|
||||
if uname -m | grep -q 'x86_64'; then
|
||||
os_arch="amd64"
|
||||
@ -168,6 +170,9 @@ installation_check() {
|
||||
echo "未找到带有 nezha-dashboard 仓库的 Docker 镜像。"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
err "请手动安装 docker-compose。https://docs.docker.com/compose/install/linux/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$NZ_DASHBOARD_PATH/app" ]; then
|
||||
@ -288,8 +293,6 @@ install_dashboard() {
|
||||
esac
|
||||
fi
|
||||
|
||||
sudo chmod -R 700 $NZ_DASHBOARD_PATH
|
||||
|
||||
if [ "$IS_DOCKER_NEZHA" = 1 ]; then
|
||||
install_dashboard_docker
|
||||
elif [ "$IS_DOCKER_NEZHA" = 0 ]; then
|
||||
@ -375,7 +378,6 @@ install_agent() {
|
||||
|
||||
# 哪吒监控文件夹
|
||||
sudo mkdir -p $NZ_AGENT_PATH
|
||||
sudo chmod -R 700 $NZ_AGENT_PATH
|
||||
|
||||
echo "正在下载监控端"
|
||||
if [ -z "$CN" ]; then
|
||||
|
@ -12,7 +12,7 @@ NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
|
||||
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
|
||||
NZ_DASHBOARD_SERVICE="/etc/systemd/system/nezha-dashboard.service"
|
||||
NZ_DASHBOARD_SERVICERC="/etc/init.d/nezha-dashboard"
|
||||
NZ_VERSION="v0.19.0"
|
||||
NZ_VERSION="v0.19.1"
|
||||
|
||||
red='\033[0;31m'
|
||||
green='\033[0;32m'
|
||||
@ -65,6 +65,8 @@ geo_check() {
|
||||
}
|
||||
|
||||
pre_check() {
|
||||
umask 077
|
||||
|
||||
## os_arch
|
||||
if uname -m | grep -q 'x86_64'; then
|
||||
os_arch="amd64"
|
||||
@ -167,6 +169,9 @@ installation_check() {
|
||||
echo "No Docker images with the nezha-dashboard repository were found."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
err "Please install docker-compose manually. https://docs.docker.com/compose/install/linux/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$NZ_DASHBOARD_PATH/app" ]; then
|
||||
@ -287,8 +292,6 @@ install_dashboard() {
|
||||
esac
|
||||
fi
|
||||
|
||||
sudo chmod -R 700 $NZ_DASHBOARD_PATH
|
||||
|
||||
if [ "$IS_DOCKER_NEZHA" = 1 ]; then
|
||||
install_dashboard_docker
|
||||
elif [ "$IS_DOCKER_NEZHA" = 0 ]; then
|
||||
@ -374,7 +377,6 @@ install_agent() {
|
||||
|
||||
# Nezha Monitoring Folder
|
||||
sudo mkdir -p $NZ_AGENT_PATH
|
||||
sudo chmod -R 700 $NZ_AGENT_PATH
|
||||
|
||||
echo "Downloading Agent"
|
||||
wget -t 2 -T 60 -O nezha-agent_linux_${os_arch}.zip https://${GITHUB_URL}/nezhahq/agent/releases/download/${version}/nezha-agent_linux_${os_arch}.zip >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user