$ terminusd - shutdown control for Linux
tty0 :: system shutdown window

Control shutdowns. Completely.

terminusd is a lightweight shutdown inhibitor daemon that gives you precise control over shutdowns, reboots, and poweroffs. Build a priority-based workflow for what runs before the system goes down, block or allow reboot activity based on your criteria, and apply updates and patches safely while services are still available.

Why terminusd

Built for those who need reliable control of shutdown, reboot, and poweroff orchestration without heavyweight tooling. You get deterministic order of actions, safe package upgrades, coordinated cluster failover, and guardrails against accidental reboots - all with a simple config and clear logs. All before systemd even enters shutdown state.

Priority Groups

Commands run in ascending ordered priority groups, with parallelism per group for faster shutdown windows.

Critical Abort Guardrails

Mark essential steps as critical. A failure on any critical task halts later groups, preventing half-finished maintenance.

Drop-in Friendly Config

Easily drop configuration into /etc/terminus.d making it simple to manage and configure with any configuration management.

Shutdown/Reboot Guard

Enable/Disable shutdowns and reboots based on your own criteria, preventing accidental system interruptions. Even by root.

Privilege + Env Control

Run tasks as specific users/groups, each with their own environment specifications.

Dry Run Capabilities

Preview the full shutdown plan without executing anything in test mode before rollout, so production behavior is understandable in advance.

Ordered Shutdown Actions

terminusd acquires a systemd delay inhibitor lock and listens for shutdown signals over D-Bus. When a shutdown is requested, it holds systemd in a pre-shutdown state so service control and normal operations are still available while your workflow runs.

During that window, terminusd executes scripts, commands, or binaries in ordered priority groups, with optional critical gating. If a critical task fails, later groups do not run, preventing half-finished maintenance.

Once execution is complete, the inhibitor is released and shutdown proceeds cleanly.

1. InhibitDaemon starts and registers delay lock with logind.
2. TriggerDaemon monitors for pre-shutdown signal over D-Bus.
3. ExecuteRuns ordered commands with optional critical gating.
4. ReleaseLock is released and shutdown proceeds cleanly.

Shutdown Guard

The shutdown guard lets you dynamically allow or block shutdowns, reboots, and poweroffs through normal system commands, even for root. Use a custom script or binary to drive that state based on your own conditions, either through scheduled checks with configurable thresholds or by continuously monitoring and signaling terminusd directly.

Prevent accidental reboots during BCP or critical maintenance windows, and reduce outage risk by ensuring shutdowns only happen when your environment is truly ready.

terminusctl — Runtime Control at Your Fingertips

terminusctl is the companion control client for terminusd, built for live operational control without editing configuration files or restarting the daemon.

Check current state, manage shutdown controls, enable or disable the shutddown guard and reload configuration on the fly.

Live Status

See configured delays, live logind inhibitor alignment, guard state and the full ordered shutdown execution plan.

Dynamic Shutdown Guard Control

Enable or disable the shutdown guard without touching config files or restarting the daemon.

Logind Sync

Push the daemon's configured inhibit delay into logind.conf on demand, keeping systemd and terminusd in sync without a manual edit.

Use Cases

terminusd fits anywhere shutdown timing matters. These are a few practical ways to use it in real environments.

Installing Updates Safely

Install packages and apply updates while system services are still available, so maintenance can finish cleanly before shutdown continues.

Cluster Failover and Preparation

Run failover and service migration steps in a controlled order, making sure workloads move cleanly before a node goes down.

Disable Reboots When BCP Active

Block accidental reboots during BCP or degraded HA conditions, reducing the chance of turning a bad state into a full outage.