mirror of
https://github.com/netbootxyz/docker-netbootxyz.git
synced 2025-08-08 15:17:22 +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
|
||||||
|
10
root/init.sh
10
root/init.sh
@ -5,16 +5,22 @@ 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
|
||||||
chown -R nbxyz:nbxyz /var/lib/nginx
|
chown -R nbxyz:nbxyz /var/lib/nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user