mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2025-08-08 07:07: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
|
priority = 3
|
||||||
|
|
||||||
[program:dnsmasq]
|
[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
|
stdout_logfile=/config/tftpd.log
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
priority = 4
|
priority = 4
|
||||||
|
14
root/init.sh
14
root/init.sh
@ -5,15 +5,21 @@ mkdir -p \
|
|||||||
/assets \
|
/assets \
|
||||||
/config/nginx/site-confs \
|
/config/nginx/site-confs \
|
||||||
/config/log/nginx \
|
/config/log/nginx \
|
||||||
|
/config/dnsmasq \
|
||||||
/run \
|
/run \
|
||||||
/var/lib/nginx/tmp/client_body \
|
/var/lib/nginx/tmp/client_body \
|
||||||
/var/tmp/nginx
|
/var/tmp/nginx
|
||||||
|
|
||||||
# copy config files
|
# copy config files
|
||||||
[[ ! -f /config/nginx/nginx.conf ]] && \
|
[[ ! -f /config/nginx/nginx.conf ]] &&
|
||||||
cp /defaults/nginx.conf /config/nginx/nginx.conf
|
cp /defaults/nginx.conf /config/nginx/nginx.conf
|
||||||
[[ ! -f /config/nginx/site-confs/default ]] && \
|
[[ ! -f /config/nginx/site-confs/default ]] &&
|
||||||
envsubst < /defaults/default > /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
|
# Ownership
|
||||||
chown -R nbxyz:nbxyz /assets
|
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 \
|
/config/menus/remote/netboot.xyz-arm64-snponly.efi -sL \
|
||||||
"https://github.com/netbootxyz/netboot.xyz/releases/download/${MENU_VERSION}/netboot.xyz-arm64-snponly.efi"
|
"https://github.com/netbootxyz/netboot.xyz/releases/download/${MENU_VERSION}/netboot.xyz-arm64-snponly.efi"
|
||||||
# layer and cleanup
|
# layer and cleanup
|
||||||
echo -n "${MENU_VERSION}" > /config/menuversion.txt
|
echo -n "${MENU_VERSION}" >/config/menuversion.txt
|
||||||
cp -r /config/menus/remote/* /config/menus
|
cp -r /config/menus/remote/* /config/menus
|
||||||
rm -f /tmp/menus.tar.gz
|
rm -f /tmp/menus.tar.gz
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user