mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
J0hnby dhcp server ntp (#2376)
* Add in configuration for NTP * Add in configuration for NTP * Update CHANGELOG.md * Add in configuration for NTP * Add in configuration for NTP * Update dhcp_server/CHANGELOG.md Follow suggestion to have 1.3.0 version convention Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch> * Update dhcp_server/config.yaml Follow suggestion to have 1.3.0 version convention Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch> * Update config.yaml * Addition to quotes for settings Lint highlighted a possible issue with unquoted - added in quotes to ensure it doesn't split Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3.0
|
||||
|
||||
- Add NTP server configuration option.
|
||||
|
||||
## 1.2
|
||||
|
||||
- Fixes crash when using FQDN as domain
|
||||
|
||||
@@ -7,6 +7,7 @@ Follow these steps to get the add-on installed on your system:
|
||||
1. Navigate in your Home Assistant frontend to **Supervisor** -> **Add-on Store**.
|
||||
2. Find the "DHCP server" add-on and click it.
|
||||
3. Click on the "INSTALL" button.
|
||||
4. Modify configuration as needed
|
||||
|
||||
## How to use
|
||||
|
||||
@@ -26,6 +27,8 @@ domain: mynetwork.local
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
ntp:
|
||||
- 192.168.1.0
|
||||
default_lease: 86400
|
||||
max_lease: 172800
|
||||
networks:
|
||||
@@ -52,6 +55,11 @@ The DNS servers your DHCP server gives to your clients. This option can
|
||||
contain a list of servers. By default, it is configured to have Google's
|
||||
public DNS servers: `"8.8.8.8", "8.8.4.4".
|
||||
|
||||
### Option `ntp` (required)
|
||||
|
||||
The NTP servers your DHCP server gives to your clients. This option can
|
||||
contain a list of server. By default, none are configured ([])
|
||||
|
||||
### Option: `default_lease` (required)
|
||||
|
||||
The default time in seconds that the IP is leased to your client.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
version: "1.2"
|
||||
version: 1.3.0
|
||||
slug: dhcp_server
|
||||
name: DHCP server
|
||||
description: A simple DHCP server
|
||||
url: https://home-assistant.io/addons/dhcp_server/
|
||||
codenotary: notary@home-assistant.io
|
||||
advanced: true
|
||||
arch:
|
||||
- armhf
|
||||
@@ -18,6 +19,7 @@ options:
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
ntp: []
|
||||
domain: null
|
||||
hosts: []
|
||||
max_lease: 172800
|
||||
@@ -33,6 +35,8 @@ schema:
|
||||
default_lease: int
|
||||
dns:
|
||||
- str
|
||||
ntp:
|
||||
- str
|
||||
domain: str
|
||||
hosts:
|
||||
- ip: str
|
||||
|
||||
@@ -20,6 +20,15 @@ MAX_LEASE=$(bashio::config 'max_lease')
|
||||
echo "authoritative;"
|
||||
} > "${CONFIG}"
|
||||
|
||||
# Create NTP Server List
|
||||
if [ "$(bashio::config 'ntp')" ]
|
||||
then
|
||||
NTP=$(bashio::config 'ntp|join(", ")')
|
||||
{
|
||||
echo "option ntp-servers ${NTP};";
|
||||
} >> "${CONFIG}"
|
||||
fi
|
||||
|
||||
# Create networks
|
||||
for network in $(bashio::config 'networks|keys'); do
|
||||
BROADCAST=$(bashio::config "networks[${network}].broadcast")
|
||||
|
||||
Reference in New Issue
Block a user