The master configuration file

Our system will use a master configuration file that will tell it how everything is set up and connected. This configuration file will be used by both the web control panel and the main alarm control scripts so that the two sub-systems can "talk" to each other. Let's create the file with our initial settings.

The settings file will be stored in the same location as where we will create our control scripts in Chapter 9, Putting It All Together, which is in the folder. /etc/pi-alarm. So, let's create this folder, and give it execute rights so that our scripts can be run:

$ cd /etc
$ sudo mkdir pi-alarm
$ sudo chmod 777 pi-alarm

We'll now create the master configuration file, to be used by our system, in this folder: ...

Get Raspberry Pi: Amazing Projects from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.