Skip to content

Instantly share code, notes, and snippets.

@andreibosco
Created January 30, 2014 02:28
Show Gist options
  • Select an option

  • Save andreibosco/8701532 to your computer and use it in GitHub Desktop.

Select an option

Save andreibosco/8701532 to your computer and use it in GitHub Desktop.
Raspberry boot info
#!/bin/bash
IP_LOCAL=`hostname -i`
IP_EXTERNAL=`curl -s icanhazip.com`
HD_FREE=`df -Ph . | tail -1 | awk '{print $4}'`
OUTPUT=/tmp/rpi-info
rm /tmp/rpi-info
echo -e `date`'\n' >> $OUTPUT
echo -e "IP Local: $IP_LOCAL" >> $OUTPUT
echo -e "IP Externo: $IP_EXTERNAL\n" >> $OUTPUT
echo -e "Espaco disponivel: $HD_FREE" >> $OUTPUT
mail -s 'Raspberry Pi iniciado' [email protected] < /tmp/rpi-info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment