Advertisement
Guest User

Untitled

a guest
Jun 12th, 2017
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. ***set time zone
  2. sudo dpkg-reconfigure tzdata
  3. ** update software
  4. sudo apt update && sudo apt upgrade -y
  5. sudo apt install linux-image-c2 -y
  6. and change from <Yes> to <No> in the upcoming dialogue:
  7. *** install mail utils
  8. 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
  9.  
  10. *** config smtp servers
  11. sudo nano /etc/ssmtp/ssmtp.conf
  12.  
  13. root=you@gmail.com
  14. mailhub=smtp.gmail.com:587
  15. AuthUser=you@gmail.com
  16. AuthPass=yourpass
  17. UseTLS=YES
  18. UseSTARTTLS=YES
  19. AuthMethod=LOGIN
  20.  
  21. **Config Root mail id
  22. sudo nano /etc/ssmtp/revaliases
  23. root:adspl.ip@gmail.com:smtp.gmail.com:587
  24.  
  25. *** script for getting data
  26.  
  27. <script for DATA>
  28. #!/bin/bash
  29. (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 )
  30. if [ -s file.tmp ]
  31. then
  32. mail -s "mail subject" -- you@gmail.com <file.tmp
  33. fi
  34. rm file.tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement