mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2025-08-07 22:57:29 +02:00
use a config file for dnsmasq
This commit is contained in:
parent
040c56f51f
commit
25ef084bd0
5
root/defaults/dnsmasq.conf
Normal file
5
root/defaults/dnsmasq.conf
Normal file
@ -0,0 +1,5 @@
|
||||
# TFTP config
|
||||
enable-tftp
|
||||
user=nbxyz
|
||||
tftp-secure
|
||||
tftp-root=/config/menus
|
@ -22,7 +22,7 @@ directory=/app
|
||||
priority = 3
|
||||
|
||||
[program:dnsmasq]
|
||||
command=/usr/sbin/dnsmasq --port=0 --keep-in-foreground --enable-tftp --user=nbxyz --tftp-secure --tftp-root=/config/menus %(ENV_TFTPD_OPTS)s
|
||||
command=/usr/sbin/dnsmasq --conf-file=/config/dnsmasq/dnsmasq.conf --port=0 --keep-in-foreground %(ENV_TFTPD_OPTS)s
|
||||
stdout_logfile=/config/tftpd.log
|
||||
redirect_stderr=true
|
||||
priority = 4
|
||||
|
14
root/init.sh
14
root/init.sh
@ -5,15 +5,21 @@ mkdir -p \
|
||||
/assets \
|
||||
/config/nginx/site-confs \
|
||||
/config/log/nginx \
|
||||
/config/dnsmasq \
|
||||
/run \
|
||||
/var/lib/nginx/tmp/client_body \
|
||||
/var/tmp/nginx
|
||||
|
||||
# copy config files
|
||||
[[ ! -f /config/nginx/nginx.conf ]] && \
|
||||
[[ ! -f /config/nginx/nginx.conf ]] &&
|
||||
cp /defaults/nginx.conf /config/nginx/nginx.conf
|
||||
[[ ! -f /config/nginx/site-confs/default ]] && \
|
||||
envsubst < /defaults/default > /config/nginx/site-confs/default
|
||||
[[ ! -f /config/nginx/site-confs/default ]] &&
|
||||
envsubst </defaults/default >/config/nginx/site-confs/default
|
||||
|
||||
# create dnsmasq config
|
||||
if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then
|
||||
cp /defaults/dnsmasq.conf /config/dnsmasq/dnsmasq.conf
|
||||
fi
|
||||
|
||||
# Ownership
|
||||
chown -R nbxyz:nbxyz /assets
|
||||
@ -67,7 +73,7 @@ if [[ ! -f /config/menus/remote/menu.ipxe ]]; then
|
||||
/config/menus/remote/netboot.xyz-arm64-snponly.efi -sL \
|
||||
"https://github.com/netbootxyz/netboot.xyz/releases/download/${MENU_VERSION}/netboot.xyz-arm64-snponly.efi"
|
||||
# layer and cleanup
|
||||
echo -n "${MENU_VERSION}" > /config/menuversion.txt
|
||||
echo -n "${MENU_VERSION}" >/config/menuversion.txt
|
||||
cp -r /config/menus/remote/* /config/menus
|
||||
rm -f /tmp/menus.tar.gz
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user