1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
systemd/test/testsuite-63.units/test63.service
Luca Boccassi 4c42032854 service: set TRIGGER_UNIT= and TRIGGER_PATH= on activation by path unit
When a service is triggered by a path unit, pass the
path unit name and the path that triggered it via env vars
to the spawned processes.
Note that this is best-effort, as there might be many triggers
at the same time, but we only get woken up by one.
2022-08-23 20:38:08 +01:00

9 lines
227 B
Desktop File

# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
ConditionPathExists=/tmp/nonexistent
[Service]
ExecStartPre=sh -c 'test "$TRIGGER_PATH" = /tmp/test63'
ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = test63.path'
ExecStart=true