Skip to content

Commit

Permalink
check installation
Browse files Browse the repository at this point in the history
  • Loading branch information
sunway910 committed Jul 31, 2024
1 parent 118db76 commit 8fb886a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ install_dependencies() {
if ! command_exists bc; then
apt-get install -y bc
fi
if ! command_exists dmidecode; then
apt install -y dmidecode
fi

elif [ x"$DISTRO" == x"CentOS" ]; then
log_info "------------Yum update--------------"
Expand All @@ -68,6 +71,9 @@ install_dependencies() {
if ! command_exists bc; then
yum install -y bc
fi
if ! command_exists dmidecode; then
yum install -y dmidecode
fi
fi

need_install_yq=1
Expand Down Expand Up @@ -201,7 +207,7 @@ install_mineradm() {
if ! enableDockerAPI; then
log_err "Fail to enable Docker API, try to enable it manually: https://docs.docker.com/config/daemon/remote-access/"
log_info "The monitor service: watchdog, can not be run if docker api is not enabled."
cat /lib/systemd/system/backup-docker.service > /lib/systemd/system/docker.service
cat /lib/systemd/system/backup-docker.service >/lib/systemd/system/docker.service
sudo systemctl daemon-reload
sudo systemctl restart docker
fi
Expand Down
9 changes: 5 additions & 4 deletions scripts/miner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ install() {
fi

docker compose -f $compose_yaml up -d $services

if [ "$(yq eval ".services.watchdog-web" $compose_yaml)" ]; then
if [ "$(yq eval ".services.watchdog-web.environment" $compose_yaml)" ]; then
log_info "Storage monitor run at: http://localhost:13080"
if [ "$(yq eval ".watchdog.enable" $config_path)" == "true" ]; then
if [ "$(yq eval ".services.watchdog-web" $compose_yaml)" ]; then
if [ "$(yq eval ".services.watchdog-web.environment" $compose_yaml)" ]; then
log_info "Storage monitor run at: http://localhost:13080"
fi
fi
fi

Expand Down

0 comments on commit 8fb886a

Please sign in to comment.