dnd — Do Not Disturb
Process enforcer for shared machines. Monitors running processes and kills anything owned by users who aren't on the allowed list. Designed for honor-code reservation systems where some users don't follow the rules.
Quick start
No install needed — run directly with uvx:
# Allow everyone by default, block specific users:
uvx dnd-daemon allow '*'
uvx dnd-daemon block debopman
# Start the daemon (foreground, for testing):
uvx dnd-daemon run --dry-run
# Start for real:
uvx dnd-daemon run
Install
For persistent use, install globally with uv:
uv tool install dnd-daemon
Then use dnd directly:
dnd allow '*'
dnd block debopman
dnd run
Alternatively, install with pip:
pip install dnd-daemon
Commands
| Command | Description |
|---|---|
dnd run |
Start the enforcement daemon |
dnd allow <users...> |
Add users to the allowed list (also unblocks them) |
dnd block <users...> |
Add users to the blocked list (also removes from allowed) |
dnd list |
Show current allowed and blocked users |
dnd install |
Install as a systemd service (requires sudo) |
dnd uninstall |
Remove the systemd service (requires sudo) |
dnd status |
Show systemd service status |
dnd run options
--dry-run— log what would be killed without actually killing--daemon— fork into background--interval N— seconds between scans (default: 10)--verbose— debug-level logging
Wildcards
Use * in the allowed list to allow everyone by default. The blocked list
always takes priority over the wildcard:
dnd allow '*' # everyone is allowed
dnd block baduser # ...except baduser
Configuration
User lists are stored in ~/.cache/dnd/:
~/.cache/dnd/
allowed_users.txt
blocked_users.txt
dnd.log
Override with --allow-config and --block-config:
dnd --allow-config /path/to/allowed.txt list
Systemd service
sudo dnd install # creates, enables, and starts the service
sudo dnd uninstall # stops, disables, and removes the service
dnd status # show service status
The service runs as the installing user with CAP_KILL for permission to
terminate other users' processes. Config changes via dnd allow / dnd block
are automatically picked up (the daemon reloads on SIGHUP).
How it works
- Scans
/procevery 10 seconds for all running processes - Skips system/service accounts (UID <= 999, known service names)
- Checks each remaining process owner against the allowed/blocked lists
- Sends SIGTERM, waits 5 seconds, then SIGKILL if still alive
Release files for dnd-daemon 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dnd_daemon-0.0.1.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dnd_daemon-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / dnd_daemon-0.0.1.tar.gz
| Download URL | dnd_daemon-0.0.1.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e1f3fc260f8de6419d4f6de1f9f63f2034368cdc424ccb021c3b34039938c78
|
|
BLAKE2b-256 checksum How to use checksums |
66e423bf03825212b4e43d0372063a000f51875c8d701df51f862a8b47d43ef1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2026.
Transparency logRelease files / dnd_daemon-0.0.1-py3-none-any.whl
| Download URL | dnd_daemon-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d51935ee41ccc836c2ec6b8bfc58ba10e2692085f31520808bc70404fe0efbf
|
|
BLAKE2b-256 checksum How to use checksums |
c3d8d5f6c29464e24ef6f3564b2c749582fa3334fcad285c63294a7f587adedb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 28, 2026.
Transparency log