forked from evolix/evocheck
APACHE_SYMLINK: Add verbose mode and replace stat by find
This commit is contained in:
parent
cad468af62
commit
982db855aa
12
evocheck.sh
12
evocheck.sh
|
@ -538,7 +538,17 @@ check_apachectl() {
|
|||
# Check if there is regular files in Apache sites-enabled.
|
||||
check_apachesymlink() {
|
||||
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
|
||||
}
|
||||
# Check if there is real IP addresses in Allow/Deny directives (no trailing space, inline comments or so).
|
||||
|
|
Loading…
Reference in a new issue