Skip to content

Commit 2bd80c0

Browse files
committed
doc: is_active()
1 parent 07f8122 commit 2bd80c0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ Small rust crate to interact with systemd units
1414
Nominal service operations:
1515

1616
```rust
17-
use systemctl;
18-
systemctl::stop("systemd-journald.service").unwrap();
19-
systemctl::restart("systemd-journald.service").unwrap();
17+
systemctl::stop("systemd-journald.service")
18+
.unwrap();
19+
systemctl::restart("systemd-journald.service")
20+
.unwrap();
21+
22+
let is_active = systemctl::is_active("ntpd")
23+
.unwrap();
2024
```
2125

2226
## Service enumeration

0 commit comments

Comments
 (0)