mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-16 10:41:34 +10:00
Dnsmasq/Hosts UI tweaks, test harness: down before redeploy, exclude leases from mount
- Dnsmasq page: Config (Main config, Managed file, Config set) under Service configuration; remove Paths/Leases (in Effective config DHCP); EffectiveConfigSection collapsible groups; StatusSection flex-wrap - Hosts: HostsFileSection always shows table; 'No host entries' in tbody when empty - Models: reorganize into sub-namespaces (Config, EffectiveConfig, Hosts, Dhcp, Status); move EffectiveConfig/Status/Logs components under Dnsmasq - Test harness: prepare-test-mount.sh runs 'docker compose down' before mount+up so all containers (including DHCP clients) restart; exclude testdata/leases from sync (unit tests only); testdata/README
This commit is contained in:
@@ -168,6 +168,10 @@ if [ ! -d "$SOURCE_DIR" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Take the harness down so all containers (including one-shot DHCP clients) are recreated on up.
|
||||
echo "Stopping test harness: docker compose -f $COMPOSE_FILE down"
|
||||
docker compose -f "$COMPOSE_FILE" down
|
||||
|
||||
mkdir -p "$MOUNT_DIR"
|
||||
|
||||
if [ "$NO_CLEAR" = false ]; then
|
||||
@@ -176,9 +180,10 @@ if [ "$NO_CLEAR" = false ]; then
|
||||
fi
|
||||
|
||||
if command -v rsync >/dev/null 2>&1; then
|
||||
rsync -a "$SOURCE_DIR/" "$MOUNT_DIR/"
|
||||
rsync -a --exclude='leases' "$SOURCE_DIR/" "$MOUNT_DIR/"
|
||||
else
|
||||
cp -r "$SOURCE_DIR/." "$MOUNT_DIR/"
|
||||
rm -f "$MOUNT_DIR/leases"
|
||||
fi
|
||||
|
||||
# Remove any leftover managed config from previous runs so dnsmasq starts clean (app will create zz-dnsmasq-webui.conf on startup).
|
||||
|
||||
Reference in New Issue
Block a user