mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
15 lines
497 B
SYSTEMD
15 lines
497 B
SYSTEMD
|
# 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
|
||
|
OnFailure=poweroff.target
|
||
|
OnFailureJobMode=replace-irreversibly
|
||
|
|
||
|
[Service]
|
||
|
Type=oneshot
|
||
|
ExecStartPre=-rm -f /failed-services
|
||
|
ExecStart=/usr/lib/systemd/mkosi-check-and-shutdown.sh
|
||
|
ExecStartPost=systemctl poweroff --no-block
|