From 42b2963ee042c4813783552ab762388a2f335948 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 26 Jun 2020 09:49:12 +0000 Subject: [PATCH] how to list and restart services --- serviceman/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/serviceman/README.md b/serviceman/README.md index d071731..20fa8d9 100644 --- a/serviceman/README.md +++ b/serviceman/README.md @@ -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 -- 2.25.1