HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

test/test-execute/exec-noexecpaths-simple.service

Git blob: 2eb8aae6abb7190de73d4a977faff55b82585b3d

Lines 1–12 of 12

# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test for NoExecPaths=
 
[Service]
Type=oneshot
# This should work, as we explicitly disable the effect of NoExecPaths=
ExecStart=+bash -c '/bin/cat /dev/null'
# This should also work, as we do not disable the effect of NoExecPaths= but invert the exit code
ExecStart=bash -x -c '! /bin/cat /dev/null'
NoExecPaths=/bin/cat