5.5. Building and Testing ladd

You don't need to install a whole set of alarm sensors to run this daemon—all you need is a standard PC with a parallel port. Before running the daemon, you must create the directory /opt/laddie/ladd/, because the alarm daemon creates a PID file in this directory. Use these commands to create this directory as root:

mkdir /opt/laddie/ladd

The source code for ladd is on the companion CD in /Code/src/ladd. Compile the alarm daemon and then run the daemon as root, as shown in the following commands:

cd /Code/src/ladd
make
su
./ladd

To make sure that the alarm daemon is running and responding to user requests, invoke the psql SQL command shown below, and verify that the Zone table is displayed.

 psql -h localhost -p ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.