#!/bin/sh

FAN_CTRL_PID=/var/run/fan_controller.pid

#  wake up the fan controller
if [ -f "${FAN_CTRL_PID}" ]; then
  fan_ctrl_pid=`/bin/cat ${FAN_CTRL_PID}`
else
  fan_ctrl_pid=`/usr/bin/pgrep fan_controller`
fi

[ -n "${fan_ctrl_pid}" ]    || exit 1
kill -USR2 ${fan_ctrl_pid}  || exit 1

exit 0

