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