Merge pull request #231 from usmannasir/qtwrkdev

minor fix on lsphp74-zip
This commit is contained in:
Usman Nasir
2020-02-02 16:58:09 +05:00
committed by GitHub
2 changed files with 42 additions and 2 deletions

View File

@@ -667,12 +667,17 @@ elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then
SERVER_OS="CentOS"
CENTOS_8="True"
elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then
if uname -m | grep -q 64 ; then
echo -e "\nDetecting Ubuntu 18.04...\n"
SERVER_OS="Ubuntu"
else
echo -e "\nUbuntu 18.04 x32 detected...ths only works on x64 system."
exit
fi
else
cat /etc/*release
echo -e "\nUnable to detect your OS...\n"
echo -e "\nCyberPanel is supported on Ubuntu 18.04, CentOS 7.x, CentOS 8.x and CloudLinux 7.x...\n"
echo -e "\nCyberPanel is supported on Ubuntu 18.04 x86_64, CentOS 7.x, CentOS 8.x and CloudLinux 7.x...\n"
exit 1
fi
}
@@ -1202,7 +1207,7 @@ for version in $(ls /usr/local/lsws | grep lsphp);
if [[ ! -d /usr/local/lsws/$version/tmp ]] ; then
mkdir /usr/local/lsws/$version/tmp
fi
/usr/local/lsws/${version}/bin/pecl channel-update pecl.php.net;
/usr/local/lsws/${version}/bin/pecl channel-update pecl.php.net
/usr/local/lsws/${version}/bin/pear config-set temp_dir /usr/local/lsws/${version}/tmp
/usr/local/lsws/${version}/bin/pecl install timezonedb
echo "extension=timezonedb.so" > /usr/local/lsws/${version}/etc/php.d/20-timezone.ini
@@ -1284,7 +1289,15 @@ watchdog_setup
install_utility
if [[ ! -f /usr/sbin/ipset ]] && [[ $SERVER_OS == "Ubuntu" ]] ; then
ln -s /sbin/ipset /usr/sbin/ipset
fi
if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS == "CentOS" ]] && [[ $CENTOS_8 == "False" ]]; then
yum list installed libzip-devel
if [[ $? == "0" ]] ; then
yum remove -y libzip-devel
fi
yum install -y http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-0.11.2-6.el7.psychotic.x86_64.rpm
yum install -y http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm
/usr/local/lsws/lsphp74/bin/pecl install zip

View File

@@ -152,8 +152,13 @@ make
cp lswsgi /usr/local/CyberCP/bin/
sed -i 's|python2|python|g' /usr/bin/adminPass
chmod 700 /usr/bin/adminPass
if [[ ! -f /usr/sbin/ipset ]] && [[ $SERVER_OS == "Ubuntu" ]] ; then
ln -s /sbin/ipset /usr/sbin/ipset
fi
if [[ -f /etc/cyberpanel/webadmin_passwd ]] ; then
chmod 600 /etc/cyberpanel/webadmin_passwd
fi
@@ -165,11 +170,33 @@ fi
install_utility
if [[ $SERVER_OS == "CentOS7" ]] ; then
yum list installed lsphp74-devel
if [[ $? != "0" ]] ; then
yum install -y lsphp74-devel
fi
fi
if [[ $SERVER_OS == "Ubuntu" ]] ; then
dpkg -l lsphp74-dev
if [[ $? != "0" ]] ; then
apt install -y lsphp74-dev
fi
fi
if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS == "CentOS7" ]] ; then
yum list installed libzip-devel
if [[ $? == "0" ]] ; then
yum remove -y libzip-devel
fi
yum install -y http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-0.11.2-6.el7.psychotic.x86_64.rpm
yum install -y http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm
/usr/local/lsws/lsphp74/bin/pecl install zip
if [[ $? == 0 ]] ; then
echo "extension=zip.so" > /usr/local/lsws/lsphp74/etc/php.d/20-zip.ini
else
echo -e "\nlsphp74-zip compilation failed..."
fi
#fix the lsphp74-zip missing issue.