October 2018
Beginner to intermediate
736 pages
17h 39m
English
On a reasonably recent Linux system, service management is handled by another service: systemd. Configuration is needed for systemd to know when and how to launch the service daemon, how to shut it down, and how to restart it, along with some additional information that is used to determine when the service starts during the system's boot process. A bare-bones starting point systemd configuration file for the Gateway service would look like this:
[Unit] Description = Artisan Gateway Service After = network-online.target [Service] # - Start-up process ExecStart = python -m hms_Gateway.daemons # - How to shut the service down ExecStop = pkill -f hms_Gateway.daemons ExecRestart = pkill -f hms_Gateway.daemons;python ...