Beautify code and log messages

This commit is contained in:
tigerblue77 2022-04-11 20:38:11 +02:00
parent 67c7f905bf
commit 6731fe48b8
6 changed files with 82 additions and 50 deletions

View file

@ -4,26 +4,27 @@ RUN apt-get update
RUN apt-get install ipmitool cron -y
COPY crontab /etc/cron.d/fan-control
COPY crontab /etc/cron.d/dell_idrac_fan_control
RUN chmod 0777 /etc/cron.d/fan-control
RUN chmod 0777 /etc/cron.d/dell_idrac_fan_control
RUN touch /var/log/cron.log
ADD check-temp.sh /opt/check-temp.sh
ADD check_temp.sh /opt/check_temp.sh
ADD startup.sh /startup.sh
RUN chmod 0777 /opt/check-temp.sh
RUN chmod 0777 /opt/check_temp.sh
RUN chmod 0777 /startup.sh
RUN /usr/bin/crontab /etc/cron.d/fan-control
RUN /usr/bin/crontab /etc/cron.d/dell_idrac_fan_control
# you should override these when running. See README.md
# you should override these default values when running. See README.md
#ENV IDRAC_HOST 192.168.1.100
ENV IDRAC_HOST local
#ENV IDRAC_USER root
#ENV IDRAC_PW calvin
#ENV IDRAC_PASSWORD calvin
ENV FAN_SPEED 5
CMD /startup.sh && cron && tail -f /var/log/cron.log
CMD /startup.sh && /opt/check_temp.sh && cron && tail -f /var/log/cron.log