04_mambafan 463 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2017 LEDE-Project.org
  4. #
  5. . /lib/functions.sh
  6. board=$(board_name)
  7. case "$board" in
  8. linksys,mamba)
  9. # Set fan script execution in crontab
  10. grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0
  11. echo "# mamba fan script runs every 5 minutes" >> /etc/crontabs/root
  12. echo "*/5 * * * * /sbin/fan_ctrl.sh" >> /etc/crontabs/root
  13. # Execute one time after initial flash (instead of waiting 5 min for cron)
  14. /sbin/fan_ctrl.sh
  15. ;;
  16. esac
  17. exit 0