blob: 4b4bb87b758bb97a4ba2ba68fe58ee8c05dfe313 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
[Unit]
Description=Test for StandardOutput=truncate:
[Service]
ExecStartPre=sh -c 'printf "hello\n" > /tmp/test-exec-standardoutput-output'
ExecStartPre=sh -c 'printf "hi\n" > /tmp/test-exec-standardoutput-expected'
StandardInput=data
StandardInputText=hi
StandardOutput=truncate:/tmp/test-exec-standardoutput-output
StandardError=null
ExecStart=sh -c 'cat && cmp /tmp/test-exec-standardoutput-output /tmp/test-exec-standardoutput-expected'
Type=oneshot
|