1
0
angie-conv-image/image-entry.d/11-core-modules.envsh

37 lines
743 B
Bash
Executable File

#!/bin/sh
unset core_modules core_confload
core_modules=
core_confload="${NGX_CORE_CONFLOAD:-}"
## filter out builtin core modules
unset i
for i in ${NGX_CORE_MODULES:-} ; do
[ -n "$i" ] || continue
if is_builtin_module core "$i" ; then
log "$i is builtin module, moving to confload"
core_confload="${core_confload} $i"
continue
fi
## naive deduplication
case " ${core_modules} " in
*" $i "* )
log "$i is already specified"
continue
;;
esac
core_modules="${core_modules}${core_modules:+ }$i"
done
unset i
set -a
NGX_CORE_MODULES="${core_modules}"
NGX_CORE_CONFLOAD=$(sort_dedup_list "${core_confload}")
NGX_CORE_EVENTS_CONFLOAD=$(sort_dedup_list "${NGX_CORE_EVENTS_CONFLOAD}")
set +a
unset core_modules core_confload