From eb0f6229a7b91a8d0657461b869cf5a434d67963 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Wed, 4 Mar 2020 00:58:27 +0100 Subject: [PATCH] Create install.sh --- install.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 000000000..a517e0d0e --- /dev/null +++ b/install.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +OUTPUT=$(cat /etc/*release) +if echo $OUTPUT | grep -q "CentOS Linux 7" ; then + echo "Checking and installing curl and wget" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="CentOS" +elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then + echo -e "\nDetecting Centos 8...\n" + SERVER_OS="CentOS8" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null +elif echo $OUTPUT | grep -q "CloudLinux 7" ; then + echo "Checking and installing curl and wget" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="CloudLinux" +elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then +apt install -y -qq wget curl + SERVER_OS="Ubuntu" +else + echo -e "\nUnable to detect your OS...\n" + echo -e "\nCyberPanel is supported on Ubuntu 18.04, CentOS 7.x and CloudLinux 7.x...\n" + exit 1 +fi + +rm -f cyberpanel.sh +rm -f install.tar.gz +curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null +chmod +x cyberpanel.sh +./cyberpanel.sh $@