31 lines
721 B
Bash
31 lines
721 B
Bash
|
#!/bin/sh
|
||
|
set -f
|
||
|
|
||
|
conf_dir='/etc/angie'
|
||
|
conf_file="${conf_dir}/.none.conf"
|
||
|
pid_file='/run/angie/none.pid'
|
||
|
|
||
|
angie -g "error_log /dev/stderr warn; pid ${pid_file};" -c "${conf_file}" -t
|
||
|
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
|