This is a very simple script which sends an e-mail when a Raspberry Pi device boots.
To run, the script requires Python 3, a user pi configured in the system and the packages mailutils and ssmtp installed and configured.
To install the script, login as pi and execute the following commands:
cd /home/pi
git clone https://github.com/HaraldoFilho/pi_utils.git
cd pi_utils/boot_mail
./install.sh
To uninstall, just run:
cd /home/pi/pi_utils/boot_mail
./uninstall.sh
There is one file with default values that need to be modified by the user:
HOSTNAME=`hostname`
MAIL_FROM=""
MAIL_TO=""
Just reboot the device and the script will run in background.