diff --git a/inventory.sh b/inventory.sh index 229436f..1ba5c2e 100755 --- a/inventory.sh +++ b/inventory.sh @@ -35,9 +35,15 @@ get_confs() { while [ "$confs_size" -lt "$(stat -c %s "$confs")" ]; do confs_size=$(stat -c %s "$confs") for conf_file in $(cat "$confs"); do - # XXX: Expand the filenames - for glob in $(awk '/^[[:space:]]*Include/ {print $2}' "$conf_file"); do - realpath --canonicalize-existing --quiet $glob >> "$confs" || true + # Get all Include directives + for included in $(awk '/^[[:space:]]*Include/ {print $2}' "$conf_file"); do + # In case a directory is included even tho it's not recomended + if [ -d "$included" ]; then + included=$included/* + fi + # XXX: Expand the filenames + realpath --canonicalize-existing --quiet $included \ + | grep -v mods-available >> "$confs" || true done done sort "$confs" | uniq > "$confs"_tmp && mv "$confs"_tmp "$confs" diff --git a/notes.org b/notes.org index aae7959..ddbe26f 100644 --- a/notes.org +++ b/notes.org @@ -5,7 +5,7 @@ * Machine ** hosting05 - /etc/apache2/sites-enabled/acelem.conf -- /etc/apache2/mods-enabled/status.conf +- /etc/apache2/mods-enabled/status.conf - /home/labri/www/zp-data/.htaccess - /home/oldwiki/www/bleuroy/.htaccess