1# SPDX-License-Identifier: LGPL-2.1-or-later 2[Unit] 3Description=Check if any service failed and then shutdown the machine 4After=multi-user.target network-online.target 5Requires=multi-user.target 6Wants=systemd-resolved.service systemd-networkd.service network-online.target 7OnFailure=poweroff.target 8OnFailureJobMode=replace-irreversibly 9 10[Service] 11Type=oneshot 12ExecStartPre=-rm -f /failed-services 13ExecStart=/usr/lib/systemd/mkosi-check-and-shutdown.sh 14ExecStartPost=systemctl poweroff --no-block 15