mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-06 00:36:35 +00:00
how to list and restart services
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user