Skip to content

Instantly share code, notes, and snippets.

@hitesh83
Created June 12, 2017 11:45
Show Gist options
  • Save hitesh83/75c1641e759a27c5faaab7a383d61079 to your computer and use it in GitHub Desktop.
Save hitesh83/75c1641e759a27c5faaab7a383d61079 to your computer and use it in GitHub Desktop.
Odroid info
***set time zone
sudo dpkg-reconfigure tzdata
** update software
sudo apt update && sudo apt upgrade -y
sudo apt install linux-image-c2 -y
and change from <Yes> to <No> in the upcoming dialogue:
*** install mail utils
sudo apt-get install mailutils ssmtp -y && sudo apt-get install dnsutils -y && sudo apt-get install libpng12-dev -y && sudo apt-get install mutt
*** config smtp servers
sudo nano /etc/ssmtp/ssmtp.conf
root=you@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=you@gmail.com
AuthPass=yourpass
UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN
**Config Root mail id
sudo nano /etc/ssmtp/revaliases
root:adspl.ip@gmail.com:smtp.gmail.com:587
*** script for getting data
<script for DATA>
#!/bin/bash
(echo "Current Date & time" && date && echo && echo "Uptime" && uptime -p && echo && free | grep Mem | awk '{print "Free RAM in MB= "$4/$2 * 100.0}' && echo && echo "cpu temp=" && cat /sys/class/thermal/thermal_zone0/temp && echo && echo CPU Freq && cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq )
if [ -s file.tmp ]
then
mail -s "mail subject" -- you@gmail.com <file.tmp
fi
rm file.tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment