No description
- flock-lock the daemon pid file so a second daemon refuses to start, avoiding two supervisors spawning the same services - put each service in its own process group (setpgid) and kill the whole group on stop/force-kill, so pipelines/background children of sh -c no longer leak as orphans - SIGKILL leftover group members when a service exits unexpectedly |
||
|---|---|---|
| contrib | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| config.example.toml | ||
| LICENSE | ||
| README.md | ||
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