PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: enable_ruby_python_selector.sh Size: 2.68 KB
/usr/local/lsws/admin/misc/enable_ruby_python_selector.sh

#!/bin/bash

RUBY_LSAPI_VER="5\\."
WSGI_LSAPI_VER=2.1

alt_ruby_install()
{
    # $1 = ruby version
    if [ "x$1" != "x" ] && [ -d /opt/alt/ruby$1/bin/ ]; then
        echo "Install ruby-lsapi rack gem for alt-ruby $1"
        yum install -y alt-ruby$1-rubygem-lsapi alt-ruby$1-rubygem-rack
        /opt/alt/ruby$1/bin/gem list ruby-lsapi | grep $RUBY_LSAPI_VER >/dev/null
        if [ $? -ne 0 ]; then
            echo "Alt-ruby $1 misses ruby-lsapi 5.x gem, install latest version."
            /opt/alt/ruby$1/bin/gem install ruby-lsapi
        fi
        echo ""
    fi
}

plesk_ruby_install()
{
    # $1 = ruby version
    # $2 = rack gem version
    if [ "x$1" != "x" ] && [ -d $1 ]; then
        echo "Install ruby-lsapi gem for Plesk ruby $1"
        $1/bin/gem install ruby-lsapi
        if [ "x$2" != "x" ]; then
            $1/bin/gem install rack -v=$2
        else
            $1/bin/gem install rack -v=2.2.4
        fi
        echo ""
    fi
}

alt_python_install()
{
    # $1 = ruby version
    if [ "x$1" != "x" ] && [ -d /opt/alt/python$1/bin/ ]; then
        if [ -d /opt/alt/python$1 ]; then
            echo "Install wsgi-lsapi for python $1"
            yum install -y alt-python$1-wsgi-lsapi
            if [ ! -f /opt/alt/python$1/bin/lswsgi ]; then
                /opt/alt/python$1/bin/python3 configure.py
                yum install devtoolset-7-toolchain
                make 1>/dev/null 2>&1
                cp lswsgi /opt/alt/python$1/bin/
                make clean
            fi
        fi
    fi
}


for VER in '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '30' '31' '32' '33'
do
    alt_ruby_install $VER
done

rm wsgi-lsapi-$WSGI_LSAPI_VER.tgz
rm -rf wsgi-lsapi-$WSGI_LSAPI_VER

wget https://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-$WSGI_LSAPI_VER.tgz

tar xvfz wsgi-lsapi-$WSGI_LSAPI_VER.tgz
cd wsgi-lsapi-$WSGI_LSAPI_VER

for VER in '27' '33' '34' '35' '36' '37' '38' '39' '310' '311' '312' '313'
do
    alt_python_install $VER
done


if [ -d /opt/plesk/ruby ]; then
    yum install -y gcc gmp-devel
    cd /opt/plesk/ruby
    for VER in '1.9.3' '2.0.0' '2.1.10'
    do
        plesk_ruby_install $VER 1.6.4
    done

    for VER in '2.2.10' '2.3.8' '2.4.10' '2.5.8' '2.6.6' '2.7.1'
    do
        plesk_ruby_install $VER
    done

fi


if [ -d /opt/cpanel/ea-ruby27/ ]; then
    echo "Install ruby-lsapi for ea-ruby27"
    scl enable ea-ruby27 'gem install ruby-lsapi'
    scl enable ea-ruby27 'gem install rack -v=2.2.4'

    if [ ! -f /usr/local/lsws/fcgi-bin/ea-ruby27 ]; then
        cat >/usr/local/lsws/fcgi-bin/ea-ruby27 <<EOF
#!/bin/sh
. /opt/cpanel/ea-ruby27/enable
/opt/cpanel/ea-ruby27/root/usr/bin/ruby \$@

EOF
        chmod a+x /usr/local/lsws/fcgi-bin/ea-ruby27
    fi
    
fi

Directory Contents

Dirs: 0 × Files: 31

Name Size Perms Modified Actions
1.17 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.82 KB lrwxr-xr-x 2026-02-08 21:13:06
Edit Download
1.82 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
2.06 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
624 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
7.31 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.46 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
2.40 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
732 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
22.41 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
336 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
2.68 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
766 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.65 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
25 B lrw-r--r-- 2025-04-11 16:27:32
Edit Download
6.43 KB lrw-r--r-- 2025-04-11 16:27:32
Edit Download
272 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
103 B lrw-r--r-- 2025-04-11 16:27:32
Edit Download
15.30 KB lrwxrwxr-x 2025-09-11 15:22:56
Edit Download
660 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
5.65 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
5.65 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.78 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
441 B lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.93 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
37.11 KB lrw-r--r-- 2025-04-11 16:27:32
Edit Download
3.23 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
5.99 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
4.61 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
2.90 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download
1.85 KB lr-xr-xr-x 2025-04-11 16:27:32
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI