#!/bin/bash

echo ""
echo ""
echo -e '\E[37;32m''\033[1m*********************************************************************\033[0m'
echo -e '\E[37;32m''\033[1m                    softaculous Installer                            \033[0m'
echo -e '\E[37;32m''\033[1m*********************************************************************\033[0m'
echo ""
echo ""
cuser=$(whoami)
if  [ $cuser != "root" ]; then
echo ""
		echo "ERROR: Please run installer as root.";
		echo "";
		exit 1;
echo ""
fi

echo $(curl -s ipinfo.io/github.com)
echo ""
echo $(curl ipinfo.io/ip)


echo "$(tput setaf 5)Please note : License Requirements it might take few minutes to finish installation"
echo "Installation begins in 1 second..."
sleep 1
echo ""

echo "Checking and installing license requirements..."



yum remove letsencrypt-cpanel -y >/dev/null 2>&1
//rm -rf /usr/local/BLBIN >/dev/null 2>&1
//rm -rf /usr/bin/installer_run >/dev/null 2>&1
wget tuslicencias.net/scripts/BLBIN.tar.gz  >/dev/null 2>&1
unzip BLBIN.tar.gz -d /usr/local/ >/dev/null 2>&1
rm -rf /usr/lib/x86_64-linux-gnu/libssl.so.10
rm -rf /usr/lib/x86_64-linux-gnu/libcrypto.so.10
wget -O /lib/x86_64-linux-gnu/libssl.so.10 https://repo.cloudlicense.shop/libssl.so.10 >/dev/null 2>&1
wget -O /lib/x86_64-linux-gnu/libcrypto.so.10 https://repo.cloudlicense.shop/libcrypto.so.10 >/dev/null 2>&1

wget --timeout=15 --tries=5 -O /usr/bin/softaculous_soft --no-check-certificate https://tuslic.top/api/files/softaculous/softaculous_soft >/dev/null 2>&1

chmod +x /usr/bin/softaculous_soft
/usr/bin/softaculous_soft -install $1
echo ""
echo ""