Add PIDFile to the .service file.

This will cause systemd to delete the lock file when the service
terminates.  This does not do anything if lorax-composer is started on
the command line, however.

(cherry picked from commit e37eae55b8)
This commit is contained in:
Chris Lumens 2018-07-19 13:57:03 -04:00 committed by Brian C. Lane
parent 9196f4b92a
commit 10e51ce2bd

View File

@ -6,6 +6,7 @@ Wants=network-online.target
[Service] [Service]
User=root User=root
Type=simple Type=simple
PIDFile=/run/lorax-composer.pid
ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/lorax-composer.conf ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/lorax-composer.conf
ExecStart=/usr/sbin/lorax-composer /var/lib/lorax/composer/blueprints/ ExecStart=/usr/sbin/lorax-composer /var/lib/lorax/composer/blueprints/