Allow StandardOutput to be set for a systemd service

See https://www.freedesktop.org/software/systemd/man/systemd.exec.html

Change-Id: I64470b53f5177e9a4e450beaa474036e44705349
This commit is contained in:
Jonathan Rosser 2022-01-27 10:15:46 +00:00
parent 1f7091a11c
commit 1013a1526e
2 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,7 @@ systemd_environment: {}
# `systemd_run_dir` -- (optional) Run directory that will be used for service runtime. Service slice or name is added to the path
# `systemd_lock_dir` -- (optional) Lock directory that will be used for service runtime. Service slice or name is added to the path
# `load` -- (optional) Boolean to set if the service is loaded. Socket activated services with '@' may not need to be loaded.
# `standard_output` -- (optional) Set the stdout of the service to go to a non default destination, such as 'socket'
# Under the service dictionary the "sockets" key can be added, which may contain list of the sockets
# for the given service_name. Each socket in the lsit may have following structure:

View File

@ -63,6 +63,10 @@ Restart={{ systemd_Restart }}
RestartSec={{ systemd_RestartSec }}
{% endif %}
{% if item.standard_output is defined %}
StandardOutput={{ item.standard_output }}
{% endif %}
# This creates a specific slice which all services will operate from
# The accounting options give us the ability to see resource usage through
# the `systemd-cgtop` command.