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