#!/bin/sh set -ef . /image-entry.d/00-common.envsh [ -d "${merged_root}" ] || install -d "${merged_root}" dirs='conf mod modules njs site snip' [ "${NGX_PROCESS_STATIC}" = 0 ] || dirs="${dirs} static" for n in ${dirs} ; do merged_dir="${merged_root}/$n" while read -r old_path ; do [ -n "${old_path}" ] || continue new_path=$(remap_path "${old_path}" "${merged_dir}") [ -n "${new_path}" ] new_dir="${new_path%/*}" [ -d "${new_dir}" ] || mkdir -p "${new_dir}" ln_s "${old_path}" "${new_path}" done <<-EOF $(overlay-dir-list.sh "/etc/angie/$n.dist" "/etc/angie/$n" "/angie/$n") EOF done exit 0