Fix errors with KTLS compilation

This commit is contained in:
iamdoubz committed 2025-07-02 12:07:10 -05:00
1 parent bff6a45aa9
commit bb4062a76d
1 file changed
+7 -5
+7 -5
View File
@@ -14,14 +14,16 @@ BUILDROOT="/home/iamdoubz/Gits/freenginx-custom"
#### END change these variables ####
####################################
kernelcheck(){
read MAJOR_VERSION MINOR_VERSION <<<$(uname -r | awk -F '.' '{print $1, $2}')
MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}')
if [ $MAJOR_VERSION -ge 5 ] && [ $MINOR_VERSION -gt 9 ] || [ $MAJOR_VERSION -ge 6 ] ; then
return 1
return true
else
return 0
return false
fi
}
check_dir()
{
path=$1
@@ -81,11 +83,11 @@ check_dir()
# sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf"
sudo ldconfig &>/dev/null
elif [ $what = "ktls" ]; then
if [ kernelcheck = true ] ; then
if [ kernelcheck ] ; then
echo " "
echo "Enabling KTLS..."
sudo modprob tls
USE_KTLS = " enable-ktls"
USE_KTLS=" enable-ktls"
fi
elif [ $what = "freenginx" ]; then
echo " "