Add a check for regular files in /etc/apache2/sites-enabled

This commit is contained in:
Benoît S. 2014-10-07 18:14:00 +02:00
parent d0436a02be
commit ba6dc0fb32

View file

@ -58,6 +58,7 @@ IS_TOOMUCHDEBIANSYSMAINT=1
IS_USERLOGROTATE=1
IS_MODSECURITY=1
IS_APACHECTL=1
IS_APACHESYMLINK=1
IS_SAMBAPINPRIORITY=1
IS_KERNELUPTODATE=1
@ -337,6 +338,12 @@ if [ -e /etc/debian_version ]; then
is_installed apache2.2-common && (/usr/sbin/apache2ctl configtest 2>&1 |grep -q "^Syntax OK$" || echo 'IS_APACHECTL FAILED!')
fi
# Check if there is regular files in Apache sites-enabled.
if [ "IS_APACHESYMLINK" = 1 ]; then
is_installed apache2.2-common && \
(stat -c %F /etc/apache2/sites-enabled/* | grep -q regular && echo 'IS_APACHESYMLINK FAILED!')
fi
# Verification de la priorité du package samba si les backports sont utilisés
if [ "$IS_SAMBAPINPRIORITY" = 1 ]; then
is_pack_samba && grep -qrE "^[^#].*backport" /etc/apt/sources.list{,.d} && ( priority=`grep -E -A2 "^Package:.*samba" /etc/apt/preferences |grep -A1 "^Pin: release a=lenny-backports" |grep "^Pin-Priority:" |cut -f2 -d" "` && test $priority -gt 500 || echo 'IS_SAMBAPINPRIORITY FAILED!' )