No description
Find a file
Niko Marmeladkov a7ce8405d1
centralize: daemon syncs state with config, cleanup orphans
- rss daemon kills and cleans services not in config (rename-safe)
- rss list also prunes orphaned state
- rss start checks for already running before spawning
- State: add supervise_dir/service_dir/list_pid_names helpers
2026-07-03 11:20:36 +03:00
contrib add unless-stopped restart policy, systemd user unit, readme 2026-07-03 11:01:59 +03:00
src centralize: daemon syncs state with config, cleanup orphans 2026-07-03 11:20:36 +03:00
.gitignore initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +03:00
Cargo.lock initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +03:00
Cargo.toml initial: per-user process supervisor (rss) 2026-07-03 10:47:25 +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 add unless-stopped restart policy, systemd user unit, readme 2026-07-03 11:01:59 +03:00

rss — RuSt Supervisor

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

Philosophy

  • KISS — one binary, one job. Each service gets its own supervisor process.
  • UNIX way — PID files for state, no IPC, no sockets.
  • User-space — everything under ~/.config/rss/ and ~/.local/share/rss/.
  • No root — runs entirely as your user.

Usage

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
rss daemon             Start all enabled 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, 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.

See config.example.toml for a full example.

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