Ctrl K
ComunidadGuías…

projects/start-os/startos-shutdown.service

Rama master · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
[Unit]
Description=StartOS graceful shutdown
# Poweroff/halt counterpart of startos-restart.service. Conflicts=poweroff/halt
# selects power-off (not reboot). The ExecStop graceful teardown must run while
# startd and the containers are still up, like a manual `start-cli server
# shutdown`. A unit ordered After=X is stopped *before* X on shutdown, so these
# two hold until the teardown has finished:
#   startd.service                     - startd must be alive to service the RPC
#   lxc.service / lxc-monitord.service  - lxc.service's ExecStop is `lxc-containers
#                                        stop`; unordered, it kills the container
#                                        before the Exit RPC ("ungracefully dropped")
# Ordering only; Conflicts= stays the sole selector.
DefaultDependencies=no
After=startd.service lxc.service lxc-monitord.service
Before=shutdown.target poweroff.target halt.target
Conflicts=poweroff.target halt.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
# start-cli waits for graceful teardown by default; authenticates locally via
# /run/startos/rpc.authcookie. startd's Shutdown::execute detects that systemd is
# already stopping and leaves the final poweroff to systemd (see shutdown.rs).
ExecStop=/usr/bin/start-cli server shutdown
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target