Skip to content

Instantly share code, notes, and snippets.

@DustinAlandzes
Last active January 25, 2017 21:59
Show Gist options
  • Save DustinAlandzes/5d0e30ddfbe44ddc667c5daad1f98cf8 to your computer and use it in GitHub Desktop.
Save DustinAlandzes/5d0e30ddfbe44ddc667c5daad1f98cf8 to your computer and use it in GitHub Desktop.
uses sendemail.py to send status email about raspberry pi displays
#!/bin/bash
PROMPT="pi@raspberrypi$ "
echo -n $PROMPT > input.txt
echo "ps aux | grep mono" >> input.txt
ps aux | grep mono >> input.txt
echo -n $PROMPT >> input.txt
echo "ps aux | grep mplayer" >> input.txt
ps aux | grep mplayer >> input.txt
echo $PROMPT >> input.txt
echo "uptime" >> input.txt
uptime >> input.txt
echo -n $PROMPT >> input.txt
echo "dmesg | tail" >> input.txt
dmesg | tail >> input.txt
echo -n $PROMPT >> input.txt
echo "free -m" >> input.txt
free -m >> input.txt
cat input.txt | ./sendemail.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment