summaryrefslogtreecommitdiffstats
path: root/test/test-execute/exec-readonlypaths-simple.service
blob: 5587e8dce71eea767d94fea7cbbecee8bdc35e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test for ReadOnlyPaths=

[Service]
Type=oneshot
# This should work, as we explicitly disable the effect of ReadOnlyPaths=
ExecStart=+/bin/sh -c 'touch /tmp/thisisasimpletest'
# This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
ExecStart=/bin/sh -x -c '! touch /tmp/thisisasimpletest'
ExecStart=+/bin/sh -c 'rm /tmp/thisisasimpletest'
ReadOnlyPaths=/tmp