From 5c7cec85203ce6aea4a0e3f13bc7a78022f385f3 Mon Sep 17 00:00:00 2001 From: fbt Date: Mon, 5 Mar 2018 04:41:55 +0300 Subject: [PATCH] readme Signed-off-by: fbt --- README.md | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 088644d..b0880a7 100644 --- a/README.md +++ b/README.md @@ -10,35 +10,32 @@ By default it's /etc/ssm/services for system services and $XDG_CONFIG_HOME/ssm/s ## Global settings -* cgroups -* usrdir -* service_path -* cfg_path +* `cgroups = 0` — Enable cgroup-related features. ## Service config Mandatory options: -* service_command +* `service_command = /usr/bin/example -a --long-arg "parameter"` Optional settings (incomplete list): -* service_respawn -* service_workdir -* service_pidfile -* service_pidfile_timeout -* service_pidfile_remove_stale -* service_logfile_out -* service_logfile_err -* service_stop_timeout -* service_ready_timeout -* service_stop_signal -* service_reload_signal -* service_cgroup_exclusive -* service_cgroup_wait -* service_cgroup_strict -* service_cgroup_kill -* service_cgroup_kill_signal -* service_cgroup_cleanup -* service_success_exit -* service_oneshot +* `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.