Skip to Content
Hands-On Embedded Programming with C++17
book

Hands-On Embedded Programming with C++17

by Maya Posch
January 2019
Intermediate to advanced
458 pages
10h 35m
English
Packt Publishing
Content preview from Hands-On Embedded Programming with C++17

Service configuration

With the Raspbian Linux distribution for Raspberry Pi SBCs, system services are usually managed with systemd. This uses a simple configuration file, with our club monitoring service using something like the following:

[Unit] 
Description=ClubStatus monitoring & control 
 
[Service] 
ExecStart=/home/user/clubstatus/clubstatus /home/user/clubstatus/config.ini 
User=user 
WorkingDirectory=/home/user/clubstatus 
Restart=always 
RestartSec=5 
 
[Install] 
WantedBy=multi-user.target 

This service configuration specifies the name of the service, with the service being started from the "user" user account's folder, and the configuration file for the service being found in the same folder. We set the working directory for the service, also ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers

Hands-On RTOS with Microcontrollers

Brian Amos

Publisher Resources

ISBN: 9781788629300Supplemental Content