Last active
May 24, 2017 10:04
-
-
Save hitesh83/db05010db40e547f1a6fd8d02fee55e3 to your computer and use it in GitHub Desktop.
Pi info in mail with ScreenShot (bash)
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/bash | |
(echo "Current Date & time" && date && echo && echo Serial Number && sed -n '/^Serial/{s/.* //;p}' /proc/cpuinfo && echo && echo "Uptime at" && uptime && echo && free | grep Mem | awk '{print "Free RAM in MB= "$4/$2 * 100.0}' && echo && /opt/vc/bin/vcgencmd measure_temp && echo && echo CPU Freq && cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq && echo && echo "Files in Playlist" && ls ) > file.tmp | |
/usr/local/bin/raspi2png -p "/home/pi/Pictures/screen.png" | |
if [ -s file.tmp ] | |
then | |
mutt -s "ADD SUBJECT HERE" -a "/home/pi/Pictures/screen.png" -- xyzabc@gmail.com <file.tmp | |
fi | |
rm file.tmp | |
rm /home/pi/Pictures/*.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment