This will allow you to sent an email at startup on Ubuntu boot. You will need to ensure sendmail is setup and working (read my guide on How to send email via G Suite from Ubuntu in the cloud, setup an Ubuntu server in the cloud here (guide here)).
Create a scripts folder
Create a file called /scripts/emailstartup.sh and add..
optional: Uncomment lines above to attach a zip file instead of a log file (don’t forget to attach the zip instead of the log file in sendmail.)
Make the script file executable
sudo chmod +X /scripts/emailstartup.sh
Test the script
Add the following to crontab -e to ensure the script is executed 5 minutes after startup.
On reboot, you will be emailed desired start-up information.
Donate and make this blog better
Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]
v1.0 initial post