31 lines
638 B
Bash
Executable File
31 lines
638 B
Bash
Executable File
#!/bin/sh
|
|
set -f
|
|
|
|
conf_dir='/etc/angie'
|
|
|
|
## Angie: unset core variable
|
|
unset ANGIE ANGIE_BPF_MAPS
|
|
|
|
_angie() {
|
|
angie -e stderr -g 'error_log /dev/stderr warn;' "$@"
|
|
}
|
|
|
|
t=$(mktemp) || exit $?
|
|
|
|
_angie -m 2>&1 | tee "$t" >/dev/null
|
|
|
|
sed -En '/^ngx_(http|mail|stream)/d;/^ngx_(.+)_module$/{s//\1/;s/_filter$//;s/_/-/g;p}' < "$t" \
|
|
| sort -uV > "${conf_dir}/builtin.core"
|
|
|
|
for m in http mail stream ; do
|
|
sed -En '/^ngx_'"${m}"'_(.+)_module$/{s//\1/;s/_filter$//;s/_/-/g;p}' < "$t" \
|
|
| sort -uV > "${conf_dir}/builtin.$m"
|
|
done
|
|
|
|
rm -f "$t" ; unset t
|
|
|
|
for m in core http mail stream ; do
|
|
echo "${conf_dir}/builtin.$m"
|
|
done \
|
|
| xargs -r ls -ld
|