5. cpid¶
This is the server daemon for the Compound Pi application. Starting the application with no arguments starts the server in the foreground. The server can be configured through command line arguments or a configuration file (which defaults to /etc/cpid.ini, /usr/local/etc/cpid.ini, or ~/.cpid.ini).
5.1. Synopsis¶
cpid [-h] [--version] [-c CONFIG] [-q] [-v] [-l FILE] [-P] [-b ADDRESS]
[-p PORT] [-d]
5.2. Description¶
- -h, --help¶
show this help message and exit
- --version¶
show program’s version number and exit
- -c CONFIG, --config CONFIG¶
specify a configuration file to load
- -q, --quiet¶
produce less console output
- -v, --verbose¶
produce more console output
- -l FILE, --log-file FILE¶
log messages to the specified file
- -P, --pdb¶
run under PDB (debug mode)
- -b ADDRESS, --bind ADDRESS¶
specifies the address to listen on for packets (default: 0.0.0.0)
- -p PORT, --port PORT¶
specifies the UDP port for the server to listen on (default: 5647)
- -d, --daemon¶
if specified, start as a background daemon
- --pidfile FILE¶
specifies the location of the pid lock file
5.3. Usage¶
The Compound Pi server is typically started at boot time by the init service. The Raspbian package includes an init script for this purpose. Users on other platforms will need to write their own init script.
When the server starts successfully it will initialize the camera and hold it open. This will prevent other applications from using the camera but also makes it easy to see that the server has started as the camera’s LED will be lit (this is useful as Compound Pi servers are typically headless).