Protect get_access from non-existing directory

This commit is contained in:
Brice Waegeneire 2020-10-02 16:35:02 +02:00
parent 6f1ed9c6be
commit 21862af025

View file

@ -1,6 +1,5 @@
#!/bin/sh
# TODO Find .htaccess from DocumentRoot
# TODO find piece of apache conf in /etc
# TODO Handle /sur/share/scripts/vhost...
# TODO total by host: vhost, htaccess, conf, cgi
@ -48,7 +47,7 @@ get_htaccess() {
awk 'sub("^[[:space:]]*DocumentRoot[[:space:]]*", "")' \
< "$confs" \
| sort -u \
| xargs -P 0 -I _ find _ -name .htaccess > "$confs_htaccess"
| xargs -P 0 -I _ find _ -name .htaccess > "$confs_htaccess" || true
}
count_directives() {