Advertisement
esalant

Untitled

May 29th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. pi@raspberrypi:/etc/update-motd.d $ cat 00-banner
  2. #!/bin/sh
  3. echo " "
  4. echo "Raspberry Pi with PiHole and Kodi"
  5. pi@raspberrypi:/etc/update-motd.d $ cat 15-systeminfo
  6. #!/bin/sh
  7.  
  8. upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
  9. secs=$((${upSeconds}%60))
  10. mins=$((${upSeconds}/60%60))
  11. hours=$((${upSeconds}/3600%24))
  12. days=$((${upSeconds}/86400))
  13. UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"`
  14.  
  15. # get the load averages
  16. read one five fifteen rest < /proc/loadavg
  17.  
  18. echo "$( )
  19. `date +"%A, %e %B %Y, %r"`
  20. `uname -srmo`$( )
  21.  
  22. CPU Model..........:`cat /proc/cpuinfo | grep 'model name' | head -1 | cut -d':' -f2`
  23. Uptime.............: ${UPTIME}
  24. Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | grep MemTotal | awk {'print $2'}`kB (Total)
  25. Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min)
  26. Running Processes..: `ps ax | wc -l | tr -d " "`
  27. IP Addresses.......: `/sbin/ifconfig eth0 | /bin/grep "inet\b" | awk '{print $2}'`
  28. Weather............: `curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=2&locCode=29414" | sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2°\3, \1/p'`
  29. $(tput sgr0)"
  30.  
  31. pi@raspberrypi:/etc/update-motd.d $ cat 30-diskspace
  32. #!/bin/sh
  33. echo " "
  34. node /home/pi/FalconStats/scripts/diskspace.js
  35. echo " "
  36. pihole status
  37. pi@raspberrypi:/etc/update-motd.d $ cat 35-linux-update
  38. #!/bin/bash
  39.  
  40. echo
  41. /usr/lib/update-notifier/apt-check --human-readable
  42. pi@raspberrypi:/etc/update-motd.d $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement