# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Check if any service failed and then shutdown the machine
After=multi-user.target network-online.target
Requires=multi-user.target
Wants=systemd-resolved.service systemd-networkd.service network-online.target
SuccessAction=exit
FailureAction=exit
# On success, exit with 123 so that we can check that we receive the actual exit code from the script on the
# host.
SuccessActionExitStatus=123

[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/mkosi-check-and-shutdown.sh
