From 5cd6e34ef03efa420e75bf0887ad781e4cfc6f2b Mon Sep 17 00:00:00 2001 From: qtwrk Date: Thu, 30 Jan 2020 19:16:32 +0100 Subject: [PATCH 1/8] minor fix on lsphp74-zip --- cyberpanel.sh | 4 ++++ cyberpanel_upgrade.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cyberpanel.sh b/cyberpanel.sh index 7cfdae467..59f567bc2 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1285,6 +1285,10 @@ watchdog_setup install_utility 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 diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 60466074f..b1475d4b5 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -166,6 +166,10 @@ fi install_utility 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 From 8df7567ae6bd5b22c00a3d6d992b85ac556e0521 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Fri, 31 Jan 2020 11:41:58 +0100 Subject: [PATCH 2/8] update python3 --- cyberpanel_upgrade.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index b1475d4b5..c343d3cb8 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -152,6 +152,7 @@ make cp lswsgi /usr/local/CyberCP/bin/ +sed -i 's|python2|python|g' /usr/bin/adminPass chmod 700 /usr/bin/adminPass if [[ -f /etc/cyberpanel/webadmin_passwd ]] ; then @@ -177,6 +178,7 @@ if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS fi #fix the lsphp74-zip missing issue. +#change python2 to python ## systemctl restart lscpd From 175ed5d12e908d5b232a8a69fef88fa986034d8a Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 1 Feb 2020 15:48:29 +0100 Subject: [PATCH 3/8] fix csf on ubuntu --- cyberpanel.sh | 4 ++++ cyberpanel_upgrade.sh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 59f567bc2..ae27cba43 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1284,6 +1284,10 @@ 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 diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index c343d3cb8..b410f9426 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -155,6 +155,10 @@ 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 @@ -178,7 +182,6 @@ if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS fi #fix the lsphp74-zip missing issue. -#change python2 to python ## systemctl restart lscpd From d843adde11122a5110344f255743661794a12b6b Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 1 Feb 2020 17:01:17 +0100 Subject: [PATCH 4/8] install lsphp74-devel --- cyberpanel_upgrade.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index b410f9426..e0bbfffdd 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -175,6 +175,11 @@ if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS if [[ $? == "0" ]] ; then yum remove -y libzip-devel fi + yum list installed lsphp74-devel + if [[ $? != "0" ]] ; then + yum install -y lsphp74-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 From 089ed11719bfe7a34646b434c0c6a483cb7678b3 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 1 Feb 2020 17:08:35 +0100 Subject: [PATCH 5/8] install lsphp74-dev --- cyberpanel_upgrade.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index e0bbfffdd..693b309a1 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -170,16 +170,26 @@ 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 list installed lsphp74-devel - if [[ $? != "0" ]] ; then - yum install -y lsphp74-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 From fef7ecc6ae822c2710590e138a62326b7a293dd7 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 1 Feb 2020 17:25:52 +0100 Subject: [PATCH 6/8] fix a typo --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index ae27cba43..75eb3587b 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1202,7 +1202,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 From 3ae98e4e7123b8a684a4f46aba4cfdcf9c85b6e0 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 1 Feb 2020 17:28:11 +0100 Subject: [PATCH 7/8] lsphp74 build fail warning --- cyberpanel_upgrade.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 693b309a1..1bde219af 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -193,7 +193,10 @@ if [[ ! -f /usr/local/lsws/lsphp74/lib64/php/modules/zip.so ]] && [[ $SERVER_OS 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. From 04f19a75914b6065fa936cf40657911262a6cfa2 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sun, 2 Feb 2020 00:12:06 +0100 Subject: [PATCH 8/8] x64 detection... --- cyberpanel.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 75eb3587b..14f65c261 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -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 }