@@ -256,31 +256,12 @@ auto_envsubst() {
256256 done
257257}
258258
259- auto_envsubst_on_include() {
260- local include_dir="/etc/nginx/include"
261- local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}"
262- local filter="${NGINX_ENVSUBST_FILTER:-}"
263-
264- local template defined_envs relative_path output_path subdir
265- defined_envs=$(printf '${%s} ' $(env | cut -d= -f1))
266- if [ ! -w "$include_dir" ]; then
267- echo "$ME: ERROR: $include_dir is not writable"
268- return 0
269- fi
270- find "$include_dir" -follow -type f -name "*$suffix" -print | while read -r template; do
271- output_path="${template%$suffix}"
272- echo "$ME: Running envsubst on $template to $output_path"
273- envsubst "$defined_envs" < "$template" > "$output_path"
274- done
275- }
276-
277259# Attempt to read DNS Resolvers from /etc/resolv.conf
278260if [ -z ${DNS_RESOLVERS+x} ]; then
279261 export DNS_RESOLVERS="$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2 | xargs)"
280262fi
281263
282264auto_envsubst
283- auto_envsubst_on_include
284265EOF
285266chmod +x /usr/local/bin/template_nginx_config.sh
286267
@@ -375,7 +356,7 @@ http {
375356}
376357EOF
377358
378- download " common/etc/nginx/include/listing.xsl.template " " /etc/nginx/include/listing.xsl.template "
359+ download " common/etc/nginx/include/listing.xsl" " /etc/nginx/include/listing.xsl"
379360download " common/etc/nginx/include/awscredentials.js" " /etc/nginx/include/awscredentials.js"
380361download " common/etc/nginx/include/awssig2.js" " /etc/nginx/include/awssig2.js"
381362download " common/etc/nginx/include/awssig4.js" " /etc/nginx/include/awssig4.js"
0 commit comments