lj2007331@gmail.com пре 6 година
родитељ
комит
f343f6a34a

+ 13 - 15
include/check_download.sh

@@ -746,22 +746,20 @@ checkDownload() {
   fi
 
   # ImageMagick graphicsmagick
-  if [ "${magick_yn}" == 'y' ]; then
-    if [ "${magick_option}" == '1' ]; then
-      echo "Download ImageMagick..."
-      src_url=${mirrorLink}/ImageMagick-${imagemagick_ver}.tar.gz && Download_src
-      echo "Download imagick..."
-      src_url=https://pecl.php.net/get/imagick-${imagick_ver}.tgz && Download_src
+  if [ "${magick_option}" == '1' ]; then
+    echo "Download ImageMagick..."
+    src_url=${mirrorLink}/ImageMagick-${imagemagick_ver}.tar.gz && Download_src
+    echo "Download imagick..."
+    src_url=https://pecl.php.net/get/imagick-${imagick_ver}.tgz && Download_src
+  elif [ "${magick_option}" == '2' ]; then
+    echo "Download graphicsmagick..."
+    src_url=http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/${graphicsmagick_ver}/GraphicsMagick-${graphicsmagick_ver}.tar.gz && Download_src
+    if [[ "${php_option}" =~ ^[1-4]$ ]]; then
+      echo "Download gmagick for php..."
+      src_url=https://pecl.php.net/get/gmagick-${gmagick_ver}.tgz && Download_src
     else
-      echo "Download graphicsmagick..."
-      src_url=http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/${graphicsmagick_ver}/GraphicsMagick-${graphicsmagick_ver}.tar.gz && Download_src
-      if [[ "${php_option}" =~ ^[1-4]$ ]]; then
-        echo "Download gmagick for php..."
-        src_url=https://pecl.php.net/get/gmagick-${gmagick_ver}.tgz && Download_src
-      else
-        echo "Download gmagick for php 7.x..."
-        src_url=https://pecl.php.net/get/gmagick-${gmagick_for_php7_ver}.tgz && Download_src
-      fi
+      echo "Download gmagick for php 7.x..."
+      src_url=https://pecl.php.net/get/gmagick-${gmagick_for_php7_ver}.tgz && Download_src
     fi
   fi
 

+ 0 - 4
include/check_sw.sh

@@ -21,8 +21,6 @@ installDepsDebian() {
   grep security /etc/apt/sources.list > /tmp/security.sources.list
   apt-get -y upgrade -o Dir::Etc::SourceList=/tmp/security.sources.list
 
-  apt-get -y autoremove
-
   # Install needed packages
   case "${Debian_ver}" in
     [6,7])
@@ -91,8 +89,6 @@ installDepsUbuntu() {
   done
   dpkg -l | grep ^rc | awk '{print $2}' | xargs dpkg -P
 
-  apt-get autoremove
-
   echo "${CMSG}Installing dependencies packages...${CEND}"
   apt-get -y update
   # critical security updates

+ 3 - 4
include/openresty.sh

@@ -16,13 +16,12 @@ Install_OpenResty() {
   tar xzf pcre-${pcre_ver}.tar.gz
   tar xzf openresty-${openresty_ver}.tar.gz
   tar xzf openssl-${openssl_ver}.tar.gz
-  [ "${Fedora_ver}" == '28' ] && patch -d openresty-${openresty_ver}/bundle/nginx-1.13.6 -p1 < 0001-unix-ngx_user-Apply-fix-for-really-old-bug-in-glibc-.patch
-  patch -d openresty-${openresty_ver}/bundle/nginx-1.13.6 -p0 < nginx-auto-cc-gcc.patch
+  [ "${Fedora_ver}" == '28' ] && patch -d openresty-${openresty_ver}/bundle/nginx-${openresty_ver%.*} -p1 < 0001-unix-ngx_user-Apply-fix-for-really-old-bug-in-glibc-.patch
+  patch -d openresty-${openresty_ver}/bundle/nginx-${openresty_ver%.*} -p0 < nginx-auto-cc-gcc.patch
   pushd openresty-${openresty_ver}
 
   # close debug
-  openresty_ver_tmp=${openresty_ver%.*}
-  sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-${openresty_ver_tmp}/auto/cc/gcc # close debug
+  sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-${openresty_ver%.*}/auto/cc/gcc # close debug
 
   [ ! -d "${openresty_install_dir}" ] && mkdir -p ${openresty_install_dir}
   ./configure --prefix=${openresty_install_dir} --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-${openssl_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc' ${nginx_modules_options}

+ 2 - 0
include/php-5.3.sh

@@ -153,6 +153,8 @@ Install_PHP53() {
     # php-fpm Init Script
     if [ -e /bin/systemctl ]; then
       /bin/cp sapi/fpm/php-fpm.service /lib/systemd/system/
+      sed -i "s@\${prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
+      sed -i "s@\${exec_prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
       systemctl enable php-fpm
     else
       /bin/cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

+ 2 - 0
include/php-5.4.sh

@@ -148,6 +148,8 @@ Install_PHP54() {
     # php-fpm Init Script
     if [ -e /bin/systemctl ]; then
       /bin/cp sapi/fpm/php-fpm.service /lib/systemd/system/
+      sed -i "s@\${prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
+      sed -i "s@\${exec_prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
       systemctl enable php-fpm
     else
       /bin/cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

+ 2 - 0
include/php-5.5.sh

@@ -161,6 +161,8 @@ EOF
     # php-fpm Init Script
     if [ -e /bin/systemctl ]; then
       /bin/cp sapi/fpm/php-fpm.service /lib/systemd/system/
+      sed -i "s@\${prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
+      sed -i "s@\${exec_prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
       systemctl enable php-fpm
     else
       /bin/cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

+ 2 - 0
include/php-5.6.sh

@@ -164,6 +164,8 @@ EOF
     # php-fpm Init Script
     if [ -e /bin/systemctl ]; then
       /bin/cp sapi/fpm/php-fpm.service /lib/systemd/system/
+      sed -i "s@\${prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
+      sed -i "s@\${exec_prefix}@${php_install_dir}@g" /lib/systemd/system/php-fpm.service
       systemctl enable php-fpm
     else
       /bin/cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

+ 1 - 1
include/upgrade_oneinstack.sh

@@ -37,7 +37,7 @@ Upgrade_OneinStack() {
     sed -i "s@^oneinstack_md5=.*@oneinstack_md5=${Latest_OneinStack_MD5}@" ./options.conf
     if [ -e "${php_install_dir}/sbin/php-fpm" ]; then
       [ -n "`grep ^cgi.fix_pathinfo=0 ${php_install_dir}/etc/php.ini`" ] && sed -i 's@^cgi.fix_pathinfo.*@;&@' ${php_install_dir}/etc/php.ini
-      sed -i 's@^cgi.fix_pathinfo=0@;&@' /usr/local/php{53,54,55,56,70,71,72}/etc/php.ini
+      [ -e "/usr/local/php53/etc/php.ini" ] && sed -i 's@^cgi.fix_pathinfo=0@;&@' /usr/local/php{53,54,55,56,70,71,72}/etc/php.ini 2>/dev/null
     fi
     echo
     echo "${CSUCCESS}Congratulations! OneinStack upgrade successful! ${CEND}"

+ 3 - 4
include/upgrade_web.sh

@@ -171,12 +171,11 @@ Upgrade_OpenResty() {
     echo "Press Ctrl+c to cancel or Press any key to continue..."
     char=`get_char`
     tar xzf openresty-${NEW_openresy_ver}.tar.gz
-    [ "${Fedora_ver}" == '28' ] && patch -d openresty-${openresty_ver}/bundle/nginx-1.13.6 -p1 < 0001-unix-ngx_user-Apply-fix-for-really-old-bug-in-glibc-.patch
-    patch -d openresty-${openresty_ver}/bundle/nginx-1.13.6 -p0 < nginx-auto-cc-gcc.patch
+    [ "${Fedora_ver}" == '28' ] && patch -d openresty-${openresty_ver}/bundle/nginx-${NEW_openresy_ver%.*} -p1 < 0001-unix-ngx_user-Apply-fix-for-really-old-bug-in-glibc-.patch
+    patch -d openresty-${openresty_ver}/bundle/nginx-${NEW_openresy_ver%.*} -p0 < nginx-auto-cc-gcc.patch
     pushd openresty-${NEW_openresy_ver}
     make clean
-    openresty_ver_tmp=${NEW_openresy_ver%.*}
-    sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-${openresty_ver_tmp}/auto/cc/gcc # close debug
+    sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' bundle/nginx-${NEW_openresy_ver%.*}/auto/cc/gcc # close debug
     ${openresty_install_dir}/nginx/sbin/nginx -V &> $$
     ./configure --prefix=${openresty_install_dir} --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-${openssl_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc' ${nginx_modules_options}
     make -j ${THREAD}

+ 2 - 2
versions.txt

@@ -57,7 +57,7 @@ php54_ver=5.4.45
 php53_ver=5.3.29
 
 libiconv_ver=1.15
-curl_ver=7.62.0
+curl_ver=7.63.0
 libmcrypt_ver=2.5.8
 mcrypt_ver=2.6.8
 mhash_ver=0.9.9.9
@@ -82,7 +82,7 @@ xdebug_ver=2.6.1
 pureftpd_ver=1.0.47
 
 # Redis
-redis_ver=5.0.2
+redis_ver=5.0.3
 pecl_redis_ver=4.2.0
 
 # Memcached