Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
BeagleBone Black Cookbook

You're reading from  BeagleBone Black Cookbook

Product type Book
Published in Nov 2015
Publisher Packt
ISBN-13 9781783982929
Pages 346 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (16) Chapters

BeagleBone Black Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Setting Up for the First Time Basic Programming Recipes Physical Computing Recipes Using JavaScript, the BoneScript Library, and Python Exploring GNU/Linux Recipes Using Bash, Autotools, Debugger, and systemd Basic Programming Recipes with the Linux Kernel Run Faster, Run Real Time Applied Recipes – Sound, Picture, and Video The Internet of Things The Black in Outer Space Index

Create a systemd service to run at boot time


Remember those ancient days of Chapter 2, Basic Programming Recipes, when you were just learning how to send an e-mail with Node.js? No? You skipped that recipe? Well, you may want to do that one before you dive into this one. In this recipe, we'll perform something similar and have the script run at boot up. Instead of having Node.js perform the job, it'll be Python and systemd.

The scenario is that you need to control your BBB remotely via SSH or VNC, but the board is offsite or running headless. As you have learned previously, in order to control the BBB remotely, we have to know the board's IP address. If you're in front of the board, it's easy enough to check the IP at the bottom of your screen via the GUI popup. However, our board is 100 miles away and isn't attached to a display. Systemd (with a healthy dash of Python) comes to the rescue!

Let's take a look at how we can have systemd send us this magical IP-addressed e-mail.

How to do it....

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}