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:
$ cd pi-alarm $ sudo nano alarm.cfg
Tip
As before, you don't have to create your files in Nano on the Raspberry Pi—you can create them on your desktop computer, and then transfer them to your Pi using SCP.
# ALARM MASTER CONFIG FILE # #Number of zones...