ssm/README.md

42 lines
2.2 KiB
Markdown
Raw Normal View History

ssm
===
Yet another service manager.
Services
--------
A service is a script in the ssm's init.d directory.
By default it's /etc/ssm/services for system services and $XDG_CONFIG_HOME/ssm/services for user ones.
## Global settings
* `cgroups = 0` — Enable cgroup-related features.
## Service config
Mandatory options:
* `service_command = /usr/bin/example -a --long-arg "parameter"`
Optional settings (incomplete list):
* `service_respawn = no` — Restart the service. Takes `no`, `always`, `on-failure` and `on-success`.
* `service_workdir = /`
* `service_pidfile` — If the service manages its own pidfile, set this.
* `service_pidfile_timeout` — How long to wait for the service to create its pidfile.
* `service_pidfile_remove_stale` — Remove stale pidfiles before spawning the service process.
* `service_logfile_out` — Logfile for output.
* `service_logfile_err` — Logfile for stderr, by default also points to `service_logfile_out`.
* `service_stop_timeout` — How long to wait after sending the stop command.
* `service_ready_timeout` — How long to wait till the service is ready, in seconds.
* `service_stop_signal` — Which signal to send to the service when stopping.
* `service_reload_signal` — Which signal to send to the service when reloading.
* `service_cgroup_exclusive` — Refuse to start the service if the cgroup is not empty.
* `service_cgroup_wait` — Wait on the entire cgroup to die when stopping the service.
* `service_cgroup_strict` — Refuse to do anything if the service's recorded PID is both running and not in the service's appropriate cgroup. This usually means you've either found a bug or something bad happened to your system.
* `service_cgroup_kill` — Kill the entire cgroup when stopping the service.
* `service_cgroup_kill_signal` — Which signal to use for that.
* `service_cgroup_cleanup` — Kill the entire cgroup on watchdog cleanup. Note that it is distinctly not the same as killing the cgroup on stopping.
* `service_success_exit` — Array. Which exit codes to treat as successful termination. Only works for managed services (With no custom pidfile).
* `service_oneshot` — The service is supposed to do something and die instead of daemonizing.