From 3713be20ea5eb3a5eba15e31ffb169ab0ae53b0c Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Fri, 29 Sep 2017 23:34:20 +0000 Subject: [PATCH] [docker-platform-monitor]: Remove stale fancontrol.pid file (if exists) before starting fancontrol --- dockers/docker-platform-monitor/start.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dockers/docker-platform-monitor/start.sh b/dockers/docker-platform-monitor/start.sh index fb87083f5cc6..b4023c16367a 100755 --- a/dockers/docker-platform-monitor/start.sh +++ b/dockers/docker-platform-monitor/start.sh @@ -18,6 +18,9 @@ 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 + # Remove stale pid file if it exists + rm -f /var/run/fancontrol.pid + /bin/cp -f /usr/share/sonic/platform/fancontrol /etc/ supervisorctl start fancontrol fi