Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ***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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement