From c489765799e0d8333f3aff3473f04d5271591ac4 Mon Sep 17 00:00:00 2001 From: WRZOOZ Date: Sat, 11 May 2024 17:06:41 +0200 Subject: [PATCH] Initial commit --- REAME.md | 14 +++++++++++ index.php | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 REAME.md create mode 100644 index.php diff --git a/REAME.md b/REAME.md new file mode 100644 index 0000000..7923b2d --- /dev/null +++ b/REAME.md @@ -0,0 +1,14 @@ +# DHCPAdmin + +## Sudo setup +There are two commands needed for this to work: +- `systemctl status 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 DHCP_LEASE_LIST=/usr/sbin/dhcp-lease-list --parsable + +www-data ALL= NOPASSWD: SYSTEMD_STATUS_DHCPD, DHCP_LEASE_LIST +``` \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..10f8072 --- /dev/null +++ b/index.php @@ -0,0 +1,69 @@ + + + + + + DHCPAdmin + + + + + +