diff options
Diffstat (limited to 'bin/ncp/SECURITY/modsecurity.sh')
-rw-r--r-- | bin/ncp/SECURITY/modsecurity.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/ncp/SECURITY/modsecurity.sh b/bin/ncp/SECURITY/modsecurity.sh index 94d8c5e8..44f5b251 100644 --- a/bin/ncp/SECURITY/modsecurity.sh +++ b/bin/ncp/SECURITY/modsecurity.sh @@ -8,9 +8,6 @@ # More at ownyourbits.com # -NCDIR=/var/www/nextcloud/ -NCPWB=/var/www/ncp-web/ - install() { apt-get update @@ -42,6 +39,9 @@ EOF configure() { + local NCDIR=/var/www/nextcloud/ + local NCPWB=/var/www/ncp-web/ + cat > /etc/modsecurity/modsecurity_crs_99_whitelist.conf <<EOF <Directory $NCDIR> # VIDEOS @@ -92,8 +92,7 @@ EOF [[ $ACTIVE == "yes" ]] && echo "Enabling module security2" || echo "Disabling module security2" [[ $ACTIVE == "yes" ]] && a2enmod security2 &>/dev/null || a2dismod security2 &>/dev/null - # delayed in bg so it does not kill the connection, and we get AJAX response - bash -c "sleep 2 && service apache2 reload" &>/dev/null & + apachectl -k graceful } # License |