Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!.env.example

logs
secrets
tests
README.md
USAGE_GUIDE.md
Expand Down
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ CHECK_INTERVAL=60
COMMAND_TIMEOUT=20
DRY_RUN=false

# DEBUG prints command context and source-selection details without passwords.
# INFO is suitable for normal unattended operation.
LOG_LEVEL=INFO

# restore iDRAC automatic fan control when auto mode exits
RESTORE_AUTO_ON_EXIT=true

Expand Down Expand Up @@ -93,3 +97,7 @@ MANUAL_FAN_SPEED=35
# -----------------------------------------------------------------------------
LOG_DIR=/var/log/fan-control
LOG_FILE=fan_control.log

# 0 derives a limit from CHECK_INTERVAL*3 + COMMAND_TIMEOUT. Set a positive
# value only when your monitoring cadence needs a different freshness window.
HEALTHCHECK_MAX_AGE=0
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
!.env.example

logs/
secrets/
*.log
*.env.backup*
*-after-incident.txt
diagnose-*.txt

.DS_Store
Thumbs.db
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
.PHONY: test validate docker-build
.PHONY: test validate validate-example tui docker-build

test:
bash -n src/FanControlWithEsxiSmart.sh
bash -n src/setIdracFanSpeed.sh
bash -n src/fan-control-tui.sh
bash tests/fan-control.test.sh
bash tests/tui.test.sh

validate:
@test -f .env || { echo "Missing .env; run 'make tui' first" >&2; exit 1; }
docker compose run --rm --no-deps \
--volume "$(CURDIR)/src/FanControlWithEsxiSmart.sh:/usr/local/bin/fan-control-dev.sh:ro" \
--entrypoint /usr/local/bin/fan-control-dev.sh \
idrac-fan-control validate

validate-example:
DRY_RUN=true OPERATION_MODE=auto TEMPERATURE_SOURCES=idrac \
IDRAC_IP=192.0.2.10 IDRAC_ID=root IDRAC_PASSWORD=test \
IDRAC_IP=10.0.0.10 IDRAC_ID=root IDRAC_PASSWORD=test \
src/FanControlWithEsxiSmart.sh validate

tui:
src/fan-control-tui.sh

docker-build:
docker build -t idrac-fan-control:local .
Loading
Loading