[docker-platform-monitor]: Add fancontrol (#735)
This commit is contained in:
parent
00c494f023
commit
22819d9983
@ -6,7 +6,8 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Update apt's package index files
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -y python-pip sensord
|
||||
# Install required packages
|
||||
RUN apt-get install -y python-pip sensord fancontrol
|
||||
|
||||
{% if docker_platform_monitor_debs.strip() %}
|
||||
# Copy built Debian packages
|
||||
|
@ -1,16 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p /etc/sensors.d
|
||||
if [ -e /usr/share/sonic/platform/sensors.conf ]; then
|
||||
/bin/cp -rf /usr/share/sonic/platform/sensors.conf /etc/sensors.d/
|
||||
fi
|
||||
|
||||
mkdir -p /var/sonic
|
||||
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
||||
|
||||
rm -f /var/run/rsyslogd.pid
|
||||
|
||||
supervisorctl start rsyslogd
|
||||
supervisorctl start lm-sensors
|
||||
|
||||
# If this platform has an lm-sensors config file, copy it to it's proper place
|
||||
# and start lm-sensors
|
||||
if [ -e /usr/share/sonic/platform/sensors.conf ]; then
|
||||
mkdir -p /etc/sensors.d
|
||||
/bin/cp -f /usr/share/sonic/platform/sensors.conf /etc/sensors.d/
|
||||
supervisorctl start lm-sensors
|
||||
fi
|
||||
|
||||
# If this platform has a fancontrol config file, copy it to it's proper place
|
||||
# and start fancontrol
|
||||
if [ -e /usr/share/sonic/platform/fancontrol ]; then
|
||||
/bin/cp -f /usr/share/sonic/platform/fancontrol /etc/
|
||||
supervisorctl start fancontrol
|
||||
fi
|
||||
|
||||
supervisorctl start ledd
|
||||
|
||||
|
@ -27,9 +27,17 @@ autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:fancontrol]
|
||||
command=/usr/sbin/fancontrol
|
||||
priority=4
|
||||
autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:ledd]
|
||||
command=/usr/bin/ledd
|
||||
priority=6
|
||||
priority=5
|
||||
autostart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
Loading…
Reference in New Issue
Block a user