[Unit] Description=TEST-02-CRYPTSETUP After=multi-user.target [Service] ExecStartPre=rm -f /failed /testok ExecStart=sh -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK > /testok' Type=oneshot