forked from evolix/evocheck
Merge branch 'apachesymlink-verbose'
This commit is contained in:
commit
8b2d789830
12
evocheck.sh
12
evocheck.sh
|
@ -538,7 +538,17 @@ check_apachectl() {
|
||||||
# Check if there is regular files in Apache sites-enabled.
|
# Check if there is regular files in Apache sites-enabled.
|
||||||
check_apachesymlink() {
|
check_apachesymlink() {
|
||||||
if is_installed apache2; then
|
if is_installed apache2; then
|
||||||
stat -c %F /etc/apache2/sites-enabled/* | grep -q regular && failed "IS_APACHESYMLINK"
|
apacheFind=$(find /etc/apache2/sites-enabled ! -type l -type f -print)
|
||||||
|
nbApacheFind=$(wc -m <<< "$apacheFind")
|
||||||
|
if [[ $nbApacheFind -gt 1 ]]; then
|
||||||
|
if [[ $VERBOSE == 1 ]]; then
|
||||||
|
while read -r line; do
|
||||||
|
failed "IS_APACHESYMLINK" "Not a symlink: $line"
|
||||||
|
done <<< "$apacheFind"
|
||||||
|
else
|
||||||
|
failed "IS_APACHESYMLINK"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# Check if there is real IP addresses in Allow/Deny directives (no trailing space, inline comments or so).
|
# Check if there is real IP addresses in Allow/Deny directives (no trailing space, inline comments or so).
|
||||||
|
|
Loading…
Reference in a new issue