2020-03-04 00:58:27 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2020-03-04 14:00:55 +01:00
|
|
|
if [ -f "/etc/os-release" ]; then
|
2020-03-04 14:06:49 +02:00
|
|
|
. /etc/os-release
|
2020-03-04 00:58:27 +01:00
|
|
|
else
|
2020-03-04 14:06:49 +02:00
|
|
|
ID="unsupported"
|
|
|
|
|
PRETTY_NAME="Your OS does not have a /etc/os-release file"
|
2020-03-04 00:58:27 +01:00
|
|
|
fi
|
|
|
|
|
|
2020-03-04 14:06:49 +02:00
|
|
|
if [ "$ID" = "ubuntu" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then
|
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
apt -q -y -o Dpkg::Options::=--force-confnew update
|
|
|
|
|
apt -q -y -o Dpkg::Options::=--force-confnew install wget curl
|
2020-03-04 14:00:55 +01:00
|
|
|
SERVER_OS="Ubuntu"
|
2020-03-04 14:06:49 +02:00
|
|
|
elif [ "$ID" = "centos" ] || [ "$ID" = "cloudlinux" ]; then
|
|
|
|
|
case "$VERSION_ID" in
|
|
|
|
|
7|7.*)
|
|
|
|
|
yum install curl wget -y 1> /dev/null
|
|
|
|
|
yum update curl wget ca-certificates -y 1> /dev/null
|
2020-03-04 14:00:55 +01:00
|
|
|
if [[ "$ID" == "centos" ]] ; then
|
|
|
|
|
SERVER_OS="CentOS"
|
|
|
|
|
else
|
|
|
|
|
SERVER_OS="CloudLinux"
|
|
|
|
|
fi
|
2020-03-04 14:06:49 +02:00
|
|
|
;;
|
|
|
|
|
8|8.*)
|
|
|
|
|
printf >&2 '\nCentOS 8/CloudLinux 8 support is currently experimental!\n'
|
|
|
|
|
yum install curl wget -y 1> /dev/null
|
|
|
|
|
yum update curl wget ca-certificates -y 1> /dev/null
|
2020-03-04 14:00:55 +01:00
|
|
|
SERVER_OS="CentOS8"
|
2020-03-04 14:06:49 +02:00
|
|
|
;;
|
|
|
|
|
esac
|
2020-03-04 14:00:55 +01:00
|
|
|
else
|
2020-03-04 14:06:49 +02:00
|
|
|
printf >&2 '\nYour OS -- %s -- is not currently supported!\n' "$PRETTY_NAME"
|
|
|
|
|
printf >&2 '\nCyberPanel is currently supported on Ubuntu 18.04, CentOS 7 and CloudLinux 7.\n'
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2020-03-04 14:00:55 +01:00
|
|
|
rm -f cyberpanel.sh install.tar.gz
|
2020-03-04 14:06:49 +02:00
|
|
|
curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&${SERVER_OS}" 2>/dev/null
|
2020-03-04 00:58:27 +01:00
|
|
|
chmod +x cyberpanel.sh
|
2020-03-04 14:06:49 +02:00
|
|
|
./cyberpanel.sh "$@"
|