1
0
angie-conv-image/scripts/angie-builtin-modules.sh

31 lines
739 B
Bash
Raw Normal View History

2024-07-15 16:15:47 +03:00
#!/bin/sh
set -f
conf_dir='/etc/angie'
conf_file="${conf_dir}/.none.conf"
pid_file='/run/angie/none.pid'
2024-07-20 17:12:15 +03:00
angie -q -e /dev/stderr -g "error_log /dev/stderr warn; pid ${pid_file};" -c "${conf_file}" -t
2024-07-15 16:15:47 +03:00
r=$?
rm -f "${pid_file}"
[ $r -eq 0 ] || exit $r
t=$(mktemp) || exit $?
angie -c "${conf_file}" -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