Replace files_with_directives with result
This commit is contained in:
parent
4594f96547
commit
bdda0c6554
|
@ -12,7 +12,7 @@ apache_conf=$apache_dir/apache2.conf
|
|||
|
||||
tmp_dir=/tmp/apache-require
|
||||
confs=$tmp_dir/confs
|
||||
files_with_directives=$tmp_dir/files_with_directives
|
||||
result=$tmp_dir/result
|
||||
mkdir -p "$tmp_dir"
|
||||
|
||||
module_loaded() {
|
||||
|
@ -55,12 +55,12 @@ count_directives() {
|
|||
}
|
||||
|
||||
display_results() {
|
||||
mv -b "$files_with_directives" "$files_with_directives".bak || true
|
||||
mv -b "$result" "$result".bak || true
|
||||
|
||||
printf 'File\tAllow\tOrder\tDeny\tSatsify\n' >&2
|
||||
# TODO make shellcheck happy
|
||||
for file in $(cat $confs); do
|
||||
count_directives "$file" | tee -a "$files_with_directives"
|
||||
count_directives "$file" | tee -a "$result"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue