Merge branch 'stable' into v1.9.5

This commit is contained in:
Usman Nasir
2020-03-04 17:46:45 +05:00
2 changed files with 39 additions and 1 deletions

View File

@@ -1566,7 +1566,7 @@ else
elif [[ "${1}" == 'r' ]] || [[ $1 == 'random' ]] ; then
ADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '')
else
if [ ${1} -lt 8 ] ; then
if [ ${#1} -lt 8 ] ; then
echo -e "\nPassword lenth less than 8 digital, please choose a more complicated password.\n"
exit
fi

38
install.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/bin/sh
if [ -f "/etc/os-release" ]; then
. /etc/os-release
else
ID="unsupported"
PRETTY_NAME="Your OS does not have a /etc/os-release file"
fi
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
SERVER_OS="$NAME"
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
SERVER_OS="$NAME"
;;
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
SERVER_OS="${NAME}${VERSION_ID}"
;;
esac
else
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
rm -f cyberpanel.sh install.tar.gz
curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&${SERVER_OS}" 2>/dev/null
chmod +x cyberpanel.sh
./cyberpanel.sh "$@"