Skip to content

djiangnz/rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

RPi scripts

HitCount

bootmail.py

  • sending an email of IP address on booting, works for both python2 and python3.
  • dig is required if you want to get your public IP address.

Usage

via curl
  1. make sure /etc/rc.local exists
  2. sudo sed -i '/^exit 0/ c\(sleep 30 && $(which curl) -sL https://raw.githubusercontent.com/dianyij/rpi/master/bootmail.py | $(which python || which python3) - to@gmail.com from@gmail.com from_password) &\n\nexit 0' /etc/rc.local
manually
  1. download the script to /home/pi/.bootmail.py
  2. change the settings and message
  3. sudo vi /etc/rc.local
  4. insert $(which python || which python3) /home/pi/.bootmail.py & before exit 0

Releases

No releases published

Packages

No packages published

Languages