Add comments
This commit is contained in:
parent
075b93f0e8
commit
6ce876ea8f
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO find piece of apache conf in /etc
|
||||
# TODO find pieces of apache conf in /etc
|
||||
# TODO Handle /sur/share/scripts/vhost...
|
||||
# TODO total by host: vhost, htaccess, conf, cgi
|
||||
|
||||
|
@ -10,18 +10,19 @@ apache_dir=/etc/apache2
|
|||
apache_conf=$apache_dir/apache2.conf
|
||||
|
||||
tmp_dir=/tmp/apache-require
|
||||
mkdir -p "$tmp_dir"
|
||||
confs=$tmp_dir/confs
|
||||
confs_vhost=$tmp_dir/confs_vhost
|
||||
confs_system=$tmp_dir/confs_system
|
||||
confs_htaccess=$tmp_dir/confs_htaccess
|
||||
result=$tmp_dir/result
|
||||
mkdir -p "$tmp_dir"
|
||||
summary=$tmp_dir/summary
|
||||
|
||||
module_loaded() {
|
||||
apache2ctl -D DUMP_MODULES | grep -q access_compat_module
|
||||
}
|
||||
|
||||
# Get all config files included the
|
||||
# Get all apache config files
|
||||
get_confs() {
|
||||
# Initialize le the list of configuration files with the default conf
|
||||
test ! -e "$confs" && printf "%s\\n" $apache_conf > "$confs"
|
||||
|
@ -42,6 +43,7 @@ get_confs() {
|
|||
cd - 1>/dev/null
|
||||
}
|
||||
|
||||
# Find all the .htaccess uder each DocumentRoot
|
||||
get_htaccess() {
|
||||
xargs -P 0 \
|
||||
awk 'sub("^[[:space:]]*DocumentRoot[[:space:]]*", "")' \
|
||||
|
@ -64,6 +66,7 @@ count_directives() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Results per files
|
||||
display_results() {
|
||||
mv -b "$result" "$result".bak || true
|
||||
|
||||
|
|
Loading…
Reference in a new issue