2024-07-15 16:15:47 +03:00
|
|
|
#!/bin/sh
|
|
|
|
set -f
|
|
|
|
|
|
|
|
conf_dir='/etc/angie'
|
|
|
|
|
2024-07-31 14:04:15 +03:00
|
|
|
## Angie: unset core variable
|
|
|
|
unset ANGIE ANGIE_BPF_MAPS
|
|
|
|
|
|
|
|
_angie() {
|
|
|
|
angie -e stderr -g 'error_log /dev/stderr warn;' "$@"
|
|
|
|
}
|
2024-07-15 16:15:47 +03:00
|
|
|
|
|
|
|
t=$(mktemp) || exit $?
|
|
|
|
|
2024-07-31 14:04:15 +03:00
|
|
|
_angie -m 2>&1 | tee "$t" >/dev/null
|
2024-07-15 16:15:47 +03:00
|
|
|
|
|
|
|
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
|