From 6c2ff849d6b1a6906f5c7398abf25cc4fce8fd1f Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Sun, 12 Sep 2021 17:35:12 +0100 Subject: [PATCH] Move dhcpd.conf preamble into a separate file. --- dhcpd.conf.head | 9 +++++++++ netbox-dhcp.sh | 16 +++------------- 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100755 dhcpd.conf.head diff --git a/dhcpd.conf.head b/dhcpd.conf.head new file mode 100755 index 0000000..a7a7c4f --- /dev/null +++ b/dhcpd.conf.head @@ -0,0 +1,9 @@ +option domain-name "home.paler.net"; +max-lease-time 600; +default-lease-time 600; + +subnet 192.168.1.0 netmask 255.255.255.0 { + option routers 192.168.1.1; + option domain-name-servers 192.168.1.1; + range 192.168.1.100 192.168.1.200; + diff --git a/netbox-dhcp.sh b/netbox-dhcp.sh index 3fe1d14..ac289ba 100755 --- a/netbox-dhcp.sh +++ b/netbox-dhcp.sh @@ -6,19 +6,9 @@ do_curl() { curl -s -k -H "Authorization: Token ${TOKEN}" -X GET $1 } -cat<