diff --git a/Dell_iDRAC_fan_controller.sh b/Dell_iDRAC_fan_controller.sh index ec34a41..36664b5 100644 --- a/Dell_iDRAC_fan_controller.sh +++ b/Dell_iDRAC_fan_controller.sh @@ -5,6 +5,7 @@ # set -euo pipefail source functions.sh +source constants.sh # Trap the signals for container exit and run graceful_exit function trap 'graceful_exit' SIGINT SIGQUIT SIGTERM @@ -51,8 +52,6 @@ echo "CPU temperature threshold: "$CPU_TEMPERATURE_THRESHOLD"°C" echo "Check interval: ${CHECK_INTERVAL}s" echo "" -# Define the interval for printing -readonly TABLE_HEADER_PRINT_INTERVAL=10 TABLE_HEADER_PRINT_COUNTER=$TABLE_HEADER_PRINT_INTERVAL # Set the flag used to check if the active fan control profile has changed IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true diff --git a/Dockerfile b/Dockerfile index 640a5a7..2f871bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get update RUN apt-get install ipmitool -y ADD functions.sh /app/functions.sh +ADD constants.sh /app/constants.sh ADD healthcheck.sh /app/healthcheck.sh ADD Dell_iDRAC_fan_controller.sh /app/Dell_iDRAC_fan_controller.sh diff --git a/constants.sh b/constants.sh new file mode 100644 index 0000000..038f9c7 --- /dev/null +++ b/constants.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Define the interval for printing temperature table header +readonly TABLE_HEADER_PRINT_INTERVAL=10