summaryrefslogtreecommitdiffstats
path: root/test/units/success-failure-test.service
diff options
context:
space:
mode:
Diffstat (limited to 'test/units/success-failure-test.service')
-rw-r--r--test/units/success-failure-test.service9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/units/success-failure-test.service b/test/units/success-failure-test.service
new file mode 100644
index 0000000..f66ff6c
--- /dev/null
+++ b/test/units/success-failure-test.service
@@ -0,0 +1,9 @@
+[Unit]
+OnSuccess=success-failure-test-success.service
+OnFailure=success-failure-test-failure.service
+
+[Service]
+Type=notify
+Restart=always
+ExecStart=bash -c 'test -f /tmp/success-failure-test-ran && touch /tmp/success-failure-test-ran2 && systemd-notify --ready && sleep infinity'
+ExecStopPost=touch /tmp/success-failure-test-ran