No description
Find a file
Niko Marmeladkov e4aea785ee
discover daemon state dir from cmdline when environ is unreadable
When the daemon runs as a different user (e.g. via systemd), the client
cannot read /proc/<pid>/environ due to permissions. Fall back to
parsing the cmdline for -D / --state-dir flags, which are world-readable.

Fixes 'error: no logs for <service>' when client and daemon run as
different users.

v0.1.1
2026-07-07 13:52:13 +03:00
contrib default to /tmp/rss/ for shared multi-user access 2026-07-03 13:10:08 +03:00
src discover daemon state dir from cmdline when environ is unreadable 2026-07-07 13:52:13 +03:00
.gitignore initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +03:00
Cargo.lock children die when rss dies via PR_SET_PDEATHSIG 2026-07-03 14:15:38 +03:00
Cargo.toml discover daemon state dir from cmdline when environ is unreadable 2026-07-07 13:52:13 +03:00
config.example.toml initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +03:00
LICENSE initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +03:00
README.md daemon: centralized architecture with Unix socket IPC 2026-07-03 11:49:46 +03:00

rss — RuSt Supervisor

Lightweight, per-user process supervisor. No root, no virtualization.

Architecture

  • Single daemon (rss daemon) manages all services in-process
  • CLI (rss start, rss stop, etc.) talks to the daemon via Unix socket
  • No PID files for services — state lives in daemon memory
  • Config hot-reload — rename/add/remove services live, daemon detects changes
  • Logs written to ~/.local/share/rss/logs/<name>.log — readable by CLI directly

Usage

First start the daemon (via systemd or terminal):

rss daemon

Then manage services:

rss start <name>       Start a service
rss stop <name>        Stop a service
rss restart <name>     Restart a service
rss status [name]      Show service status
rss logs <name> [-n N] [-f]   View logs (last N, follow)
rss enable <name> [--now]     Enable auto-start
rss disable <name>     Disable auto-start
rss list               List all services

Configuration

Place config.toml in ~/.config/rss/config.toml.

[service.NAME]
workdir       = "/path/to/project"
command       = "your command here"
stop_command  = "optional stop command"
timeout_start = 15
timeout_stop  = 10
restart       = "on-failure"   # no, always, unless-stopped, on-failure
restart_delay = 3
restart_max   = 5              # 0 = unlimited
oneshot       = false
stop_signal   = "TERM"
env = { KEY = "value" }

Placeholders in command / stop_command: {name}, {workdir}, {pid}, {log_file}, plus any env var.

Edit config.toml any time — the daemon picks up changes live.

systemd (user mode)

mkdir -p ~/.config/systemd/user
cp contrib/rss.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable rss
systemctl --user start rss

Requires linger for headless users:

sudo loginctl enable-linger $USER

Install

cargo install --path .

License

MIT