Created
October 26, 2016 08:49
-
-
Save pasora/8cdbf0f956dc82f8c4d1f0f1f46566c7 to your computer and use it in GitHub Desktop.
Warning High CPU Temperature from Raspberry Pi to LINE Notify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# degined for Raspberry Pi 3 | |
# before running, you have to install bc by `sudo apt-get install bc` | |
temp=`vcgencmd measure_temp | sed -e 's/temp\=//' -e "s/'C//"` | |
if [ "$(echo "$temp > 40.0" | bc)" -eq 1 ]; then | |
curl -X POST -H 'Authorization: Bearer [your_access_token]' -F "message=現在${temp}度です" https://notify-api.line.me/api/notify > /dev/null 2>&1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment