how to list and restart services
authorAJ ONeal <aj@therootcompany.com>
Fri, 26 Jun 2020 09:49:12 +0000 (09:49 +0000)
committerAJ ONeal <aj@therootcompany.com>
Fri, 26 Jun 2020 09:49:12 +0000 (09:49 +0000)
serviceman/README.md

index d071731d3bae40bd8906ce3371f54477d55117a3..20fa8d981435c3e55bc79f2ea7eaecea491c332a 100644 (file)
@@ -64,6 +64,29 @@ sudo env PATH="$PATH" \
 sudo env PATH="$PATH" serviceman add bash ./backup.sh /mnt/data
 ```
 
+### How to see all services
+
+```bash
+serviceman list --system
+serviceman list --user
+```
+
+```txt
+serviceman-managed services:
+
+        example-service
+```
+
+### How to restart a service
+
+You can either `add` the service again (which will update any changed options),
+or you can `stop` and then `start` any service by its name:
+
+```bash
+sudo env PATH="$PATH" serviceman stop example-service
+sudo env PATH="$PATH" serviceman start example-service
+```
+
 ## What a typical systemd .service file looks like
 
 ```txt