mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 15:26:13 +01:00
check for OLS
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set_header() {
|
||||||
if [[ -f /usr/local/lsws/conf/vhosts/$1/vhost.conf ]] ; then
|
if [[ -f /usr/local/lsws/conf/vhosts/$1/vhost.conf ]] ; then
|
||||||
cat << EOF > header.txt
|
cat << EOF > header.txt
|
||||||
|
|
||||||
@@ -72,6 +73,17 @@ EOF
|
|||||||
|
|
||||||
cat header.txt >> /usr/local/lsws/conf/vhosts/$1/vhost.conf
|
cat header.txt >> /usr/local/lsws/conf/vhosts/$1/vhost.conf
|
||||||
fi
|
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 header.txt
|
||||||
rm -f $0
|
rm -f $0
|
||||||
|
echo -e "\nexpire , cache-control and CORS header set..."
|
||||||
|
|||||||
Reference in New Issue
Block a user