mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-06 00:04:10 -04:00
emerg-shutdown: Add shutdown timeout for preventing stuck shutdowns, briefly document feature set and usage
This commit is contained in:
parent
e42078e90d
commit
1a60da71ed
8 changed files with 257 additions and 26 deletions
|
@ -6,8 +6,9 @@ Description=Emergency shutdown when boot media is removed
|
|||
Documentation=https://github.com/Kicksecure/security-misc
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
Type=notify
|
||||
ExecStart=/usr/libexec/security-misc/emerg-shutdown
|
||||
NotifyAccess=main
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
18
usr/lib/systemd/system/ensure-shutdown.service
Normal file
18
usr/lib/systemd/system/ensure-shutdown.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
[Unit]
|
||||
Description=Forcibly shut down the system if normal shutdown gets stuck
|
||||
Documentation=https://github.com/Kicksecure/security-misc
|
||||
Wants=emerg-shutdown.service
|
||||
After=emerg-shutdown.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStart=/usr/libexec/security-misc/ensure-shutdown
|
||||
ExecStop=bash -c -- 'echo "d" > /run/emerg-shutdown-trigger'
|
||||
KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue