Changed way service status is checked, so it generate less output.

This commit is contained in:
2024-05-11 18:35:11 +02:00
parent 702343c541
commit ea6080ff9a
2 changed files with 6 additions and 9 deletions

View File

@@ -2,12 +2,12 @@
## Sudo setup
There are two commands needed for this to work:
- `systemctl status isc-dhcp-server.service` to check if service does work
- `systemctl is-active isc-dhcp-server.service` to check if service does work
- `dhcp-lease-list --parsable` to get leases data
### Example sudoers configuration
```
Cmnd_Alias SYSTEMD_STATUS_DHCPD=/usr/bin/systemctl status isc-dhcp-server.service
Cmnd_Alias SYSTEMD_STATUS_DHCPD=/usr/bin/systemctl is-active isc-dhcp-server.service
Cmnd_Alias DHCP_LEASE_LIST=/usr/sbin/dhcp-lease-list --parsable
www-data ALL= NOPASSWD: SYSTEMD_STATUS_DHCPD, DHCP_LEASE_LIST