rss/config.example.toml
Niko Marmeladkov 653b8d1612
initial: per-user process supervisor (rss)
- start/stop/restart/status/logs/enable/disable/list/daemon
- PID-file based state, no daemon, no root
- config.toml with placeholders, restart policies, env vars
- log tailing with -n/-f and stderr colorization
- supervisor per service with SIGTERM handling
2026-07-03 10:47:25 +03:00

30 lines
719 B
TOML

[service.web]
workdir = "/home/user/projects/web"
command = "python3 -m http.server {port}"
stop_command = "curl -s -X POST http://localhost:{port}/shutdown"
timeout_start = 15
timeout_stop = 10
restart = "on-failure"
restart_delay = 3
restart_max = 5
oneshot = false
stop_signal = "TERM"
env = { port = "8080", HOST = "0.0.0.0" }
[service.backup]
workdir = "/home/user"
command = "tar czf /tmp/backup.tar.gz ."
oneshot = true
restart = "no"
[service.app]
workdir = "/home/user/app"
command = "node server.js --port {PORT}"
stop_command = "kill -INT {pid}"
restart = "always"
restart_delay = 2
restart_max = 10
timeout_start = 30
timeout_stop = 15
stop_signal = "INT"
env = { PORT = "3000", NODE_ENV = "production" }