aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorEfraim Flashner2020-03-02 07:40:14 +0000
committerShepherd2020-03-02 07:40:14 +0000
commit1ce2c18ef1bc739c64b16e44a0cd2c404eade42e (patch)
tree86d3e40664510deb75f0426c6030b4cbe622ae32 /README
parentf843d9c7bb5c3e3e1a6d678b67943231e97a0762 (diff)
downloadgn-shepherd-services-1ce2c18ef1bc739c64b16e44a0cd2c404eade42e.tar.gz
README: Document modular services
Diffstat (limited to 'README')
-rw-r--r--README11
1 files changed, 11 insertions, 0 deletions
diff --git a/README b/README
index a9fffb7..622887a 100644
--- a/README
+++ b/README
@@ -3,3 +3,14 @@ This repo contains the files used to run shepherd services.
The `shepherd` and `cron` directories go in `.config`
The shell scripts sit in the home directory.
+
+Working with Shepherd Services
+
+Each service is stored in a separate file. This allows us to reload individual services without needing to restart all of the services in one go. In order to see which services are available run the command `herd status`. 'Started' services are currently running, 'Stopped' services are not running but are still loaded, and 'One-shot' are services which are not running but run a one-off script or service.
+
+The services are setup so that they have code that is run when it is started and continues to run until it is stopped. Sometimes that code can call other shell scripts in the home directory. If the primary code in the service needs to be changed then the service needs to be reloaded in accordance to a process that will allow it to be reloaded without stopping all the other services. In our example the service is `foo` and it is located in a file `bar.scm`.
+
+$ herd stop foo
+$ herd load root .config/shepherd/init.d/bar.scm
+
+The second command will load the code in `bar.scm` into `shepherd`, and if the service is configured to start automatically at startup it will start immediately. This process should not affect the other running services.