403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/services/ruby-latest-offisrc
#!/bin/bash

# Add this at the begining of all scripts.
if [ -f "include/startup.sh" ]; then
    . include/startup.sh
elif [ -f "../include/startup.sh" ]; then
    . ../include/startup.sh
fi

rubyVersion=2.6.5
rubyInstallPath=/opt/ruby-$rubyVersion
rootDir=$(rootDir)

echo "Installing dependencies" | log
packages=(autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev)
installPackage "${packages[@]}"
waitOrStop 0 "Failed apt install: ${packages[@]}"

echo "Donwloading & installing Ruby build tool" | log
cd $rootDir/temp
git clone https://github.com/rbenv/ruby-build.git | log
waitOrStop 0 "File not downloaded from Github"
PREFIX=/usr/local ./ruby-build/install.sh
waitOrStop 0 "Ruby build tool failed"

echo "Installing Ruby" | log
ruby-build $rubyVersion $rubyInstallPath --verbose | log
waitOrStop 0 "Failed to install application"

echo "Adding Ruby path to global environment" | log
sed -i "s|\"$|:${rubyInstallPath}/bin\"|" /etc/environment

echo "Adding descriptions" | log
descriptionAppend "Ruby install path: ${rubyInstallPath}"

tag ruby.success
tagScript success
exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit