From d2de49ab5ef6603fe8467c9bb8e80980f3ff9eb2 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Tue, 11 Feb 2020 16:28:09 +0100 Subject: [PATCH] check for OLS --- CPScripts/EasyEngine/header.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CPScripts/EasyEngine/header.sh b/CPScripts/EasyEngine/header.sh index 0f9097f90..98f0ac5f0 100644 --- a/CPScripts/EasyEngine/header.sh +++ b/CPScripts/EasyEngine/header.sh @@ -1,5 +1,6 @@ #!/bin/bash +set_header() { if [[ -f /usr/local/lsws/conf/vhosts/$1/vhost.conf ]] ; then cat << EOF > header.txt @@ -72,6 +73,17 @@ EOF cat header.txt >> /usr/local/lsws/conf/vhosts/$1/vhost.conf fi +} + +if /usr/local/lsws/bin/lshttpd -v | grep -iF open ; then + echo -e "\nOpenLiteSpeed detected..." + set_header +else + echo -e "\nLiteSpeed Enterprise detected..." + exit + #LiteSpeed Enterprise can read htaccess for expire header, no need to set it up. +fi rm -f header.txt rm -f $0 +echo -e "\nexpire , cache-control and CORS header set..."