docker-netbootxyz/root/usr/local/bin/dnsmasq-wrapper.sh
Antony Messerli df298e7c32 Remove gosu so that ports can bind
Remove gosu so that ports can bind using root and then switch running
state to nbxyz
2025-06-19 10:18:03 -05:00

10 lines
514 B
Bash

#!/bin/bash
# Wrapper script for dnsmasq to ensure TFTP logs are visible in docker logs
echo "[dnsmasq] Starting TFTP server on port 69"
echo "[dnsmasq] TFTP root: /config/menus"
echo "[dnsmasq] TFTP security: enabled"
echo "[dnsmasq] Logging: enabled (dhcp and queries)"
# Start dnsmasq as root to bind to port 69, then drop privileges to nbxyz
exec /usr/sbin/dnsmasq --port=0 --keep-in-foreground --enable-tftp --user=nbxyz --tftp-secure --tftp-root=/config/menus --log-facility=- --log-dhcp --log-queries "$@"