#!/bin/sh if [ $(id -u) != "0" ]; then echo "Error: You have to login by user root!" exit fi if [ -f /var/cpanel/cpanel.config ]; then clear echo "Your Server installed WHM/Cpanel, if you want to use VPSSIM" echo "Lets rebuild VPS, you should use centos 6 or 7 - 64 bit" echo "Bye !" exit fi if [ -f /etc/psa/.psa.shadow ]; then clear echo "Server installed Plesk, if you want to use VPSSIM" echo "Lets rebuild VPS, you should use centos 6 or 7 - 64 bit" echo "Bye !" exit fi if [ -f /etc/init.d/directadmin ]; then clear echo "Your Server installed DirectAdmin, if you want to use VPSSIM" echo "Lets rebuild VPS, you should use centos 6 or 7 - 64 bit" echo "Bye !" exit fi if [ -f /etc/init.d/webmin ]; then clear echo "Your Server installed webmin, if you want to use VPSSIM" echo "Lets rebuild VPS, you should use centos 6 or 7 - 64 bit" echo "Bye !" exit fi if [ ! -f /home/vpssim.conf ]; then yum -y update yum upgrade -y yum -y install ntpdate; /usr/sbin/ntpdate -u pool.ntp.org timedatectl set-timezone Asia/Ho_Chi_Minh timedatectl set-ntp true yum -y install epel-release if [ -f /etc/yum.repos.d/epel.repo ]; then sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo fi #yum -y update yum -y install psmisc bc gawk gcc wget unzip net-tools ca-certificates yum -y -q install virt-what sudo zip iproute iproute2 curl deltarpm yum-utils tar nano wget -q https://vpssim.com/script/vpssim/calc -O /bin/calc && chmod +x /bin/calc if [ ! -f /bin/calc ]; then curl -o /bin/calc https://vpssim.com/script/vpssim/calc chmod +x /bin/calc fi if [ ! -d /etc/vpssim ]; then mkdir -p /etc/vpssim mkdir -p /etc/vpssim/.tmp fi rm -rf /root/vpssim* rm -rf /etc/vpssim/.tmp/vpssim-setup* fi cat > "/etc/yum.repos.d/mariadb.repo" <