Blame patches/openlitespeed-1.4.24.local.patch

Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/util/gsendfile.h.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/util/gsendfile.h	2017-02-11 15:37:19.976655229 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -83,7 +83,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #endif
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #if defined(linux) || defined(__linux) || defined(__linux__) || \
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    defined(__gnu_linux__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+    defined(__gnu_linux__) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <sys/sendfile.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #define gsendfile ::sendfile
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #endif
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/util/pcutil.h.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/util/pcutil.h	2017-02-11 15:39:02.736901419 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -18,7 +18,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #ifndef PCUTIL_H
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #define PCUTIL_H
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <sched.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 # define SET_AFFINITY(pid, size, mask) sched_setaffinity(0, size, mask)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 # define GET_AFFINITY(pid, size, mask) sched_getaffinity(0, size, mask)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/main/lshttpdmain.cpp.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/main/lshttpdmain.cpp	2017-02-11 15:50:52.882605886 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -45,7 +45,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <util/stringlist.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <util/signalutil.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <util/vmembuf.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#ifndef __midipix__
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <sys/sysctl.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <extensions/cgi/cgidworker.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <extensions/registry/extappregistry.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -1428,7 +1430,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #ifdef LSWS_NO_SET_AFFINITY
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     return 2;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     return sysconf(_SC_NPROCESSORS_ONLN);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     int nm[2];
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
--- openlitespeed-1.4.24/configure.orig	2016-12-02 19:52:25.745807731 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/configure	2017-02-11 21:11:39.234979798 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -11292,7 +11292,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   ;;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 # This must be glibc/ELF.
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+linux* | k*bsd*-gnu | kopensolaris*-gnu | midipix)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   version_type=linux # correct to gnu/linux during the next big refactor
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   need_lib_prefix=no
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   need_version=no
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
@@ -15863,16 +15863,8 @@
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 if test "$OPENLSWS_BSSL" = no ; then
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-    if test "$OSNAME" = Darwin ; then
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        usedynossl=yes
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        CPPFLAGS="$CPPFLAGS -I../../src -I../../include -I/usr/local/include -I/usr/local -I/usr -I/usr/pkg "
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-    else
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        usedynossl=no
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        CPPFLAGS="$CPPFLAGS -I../../ssl/include -I../../src -I../../include -I/usr/local/include -I/usr/local -I/usr -I/usr/pkg "
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        echo "Will build latest stable openssl libraries for you, this may take several minutes ..."
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        OSSL=`. $srcdir/dlossl.sh`
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        echo "Finsihed building openssl."
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
+    usedynossl=yes
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
+    CPPFLAGS="$CPPFLAGS -I../../src -I../../include "
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
     echo "Openssl: use_dyn_ossl = $usedynossl"
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 else
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
     #### Not provide location, use default location, will not copy files
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
@@ -15982,12 +15974,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 fi
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-ZLIB_HOME=/usr/local
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-if test ! -f "${ZLIB_HOME}/include/zlib.h"
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-then
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-        ZLIB_HOME=/usr
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 #
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 # Locate zlib, if wanted
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 #
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
@@ -16131,7 +16117,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-if test "$OSNAME" = Darwin ; then
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 # Check whether --with-openssl was given.
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
@@ -16259,8 +16244,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
-
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lib pcre" >&5
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 $as_echo_n "checking lib pcre... " >&6; }
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 PCRE_LDFLAGS=
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/util/pcutil.cpp.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/util/pcutil.cpp	2017-02-12 20:09:45.817635783 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -21,6 +21,8 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <ctype.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <stdlib.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <unistd.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#include <string.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#include <pthread.h>
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #ifdef __linux
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <sched.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -72,7 +74,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     if (s_nCpu > 0)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
         return s_nCpu;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#if defined(linux) || defined(__linux) || defined(__linux__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     s_nCpu = sysconf(_SC_NPROCESSORS_ONLN);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     int mib[2];
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -116,7 +118,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #ifdef __FreeBSD__
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     return cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
                               sizeof(cpu_set_t), mask);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#elif defined(linux) || defined(__linux) || defined(__linux__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     return pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), mask);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     //return sched_setaffinity(0, sizeof(cpu_set_t), mask);
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 #endif
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/util/sysinfo/partitioninfo.cpp.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/util/sysinfo/partitioninfo.cpp	2017-02-12 20:11:21.637846476 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -17,6 +17,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 *****************************************************************************/
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include "partitioninfo.h"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #include <lsdef.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#ifdef __midipix__
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#include <sys/statfs.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 PartitionInfo::PartitionInfo()
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 {
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -33,7 +36,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 int PartitionInfo::getPartitionInfo(const char *path, uint64_t *outTotal,
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
                                     uint64_t *outFree)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 {
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#if defined(__linux) || defined(sun)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#if defined(__linux) || defined(sun) || defined(__midipix__)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     struct statvfs st;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     if (statvfs(path, &st) != 0)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     {
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/util/sysinfo/siocglif_nicdetect.cpp.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/util/sysinfo/siocglif_nicdetect.cpp	2017-02-12 20:14:43.894291205 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -18,6 +18,9 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 struct ifi_info *
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 NICDetect::get_ifi_info(int family, int doaliases)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 {
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#ifdef __midipix__
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+    return NULL;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+#else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     struct ifi_info     *ifi, *ifihead, **ifipnext;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     int                 sockfd, len, lastlen, flags, myflags;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     char                *buf, lastname[IFNAMSIZ], *cptr;
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -163,5 +166,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     close(sockfd);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     free(buf);
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     return (ifihead);   /* pointer to first structure in linked list */
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
+#endif
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 }
Lucio Andrés Illanes Albornoz (arab, vxp) b19456
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/src/modules/Makefile.in.orig	2016-12-02 19:52:23.711814564 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/src/modules/Makefile.in	2017-02-12 20:16:36.002537713 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -185,7 +185,7 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   done | $(am__uniquify_input)`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 ETAGS = etags
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 CTAGS = ctags
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-DIST_SUBDIRS = cache uploadprogress modinspector lua
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+DIST_SUBDIRS = lua
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 am__relativize = \
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
   dir0=`pwd`; \
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -361,8 +361,8 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 AM_CPPFLAGS = -I$(top_srcdir)/openssl/include/ -I$(top_srcdir)/include -I$(top_srcdir)/src
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 libmodules_a_METASOURCES = AUTO
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 libmodules_a_SOURCES = modgzip/modgzip.cpp
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-@HAVE_LIBLUA_FALSE@SUBDIRS = cache uploadprogress modinspector
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-@HAVE_LIBLUA_TRUE@SUBDIRS = cache uploadprogress lua modinspector
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+@HAVE_LIBLUA_FALSE@SUBDIRS = 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+@HAVE_LIBLUA_TRUE@SUBDIRS = lua
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 all: all-recursive
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 .SUFFIXES:
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
--- openlitespeed-1.4.24/dist/install.sh.orig	2016-12-02 19:51:11.000000000 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
+++ openlitespeed-1.4.24/dist/install.sh	2017-02-12 20:39:56.309734680 +0000
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -1,84 +1,5 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #!/bin/sh
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-inst_admin_php()
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-{
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    # detect download method
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    OS=`uname -s`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    OSTYPE=`uname -m`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    DLCMD="wget -nv -O"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ "x$OS" = "xFreeBSD" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DL=`which fetch`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DLCMD="$DL -o"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ "x$DLCMD" = "x" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DL=`which wget`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DLCMD="$DL -nv -O"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ "x$DLCMD" = "x" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DL=`which curl`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        DLCMD="$DL -L -o"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    echo "DLCMD is $DLCMD"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    echo
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    HASADMINPHP=n
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ -f "$LSWS_HOME/admin/fcgi-bin/admin_php" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        mv "$LSWS_HOME/admin/fcgi-bin/admin_php" "$LSWS_HOME/admin/fcgi-bin/admin_php.bak"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        echo "admin_php found and mv to admin_php.bak"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ ! -d "$LSWS_HOME/admin/fcgi-bin/" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        mkdir -p "$LSWS_HOME/admin/fcgi-bin/"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        echo "Mkdir $LSWS_HOME/admin/fcgi-bin/ for installing admni_php"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ "x$OS" = "xLinux" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        if [ "x$OSTYPE" != "xx86_64" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-            $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/i386/lsphp5
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-            $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/x86_64/lsphp5
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        if [ $? = 0 ] ; then 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-            HASADMINPHP=y
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-            echo "admin_php downloaded."
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#        if [ -f  "$LSWS_HOME/admin/fcgi-bin/admin_php" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#            HASADMINPHP=y
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-#        fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    elif [ "x$OS" = "xFreeBSD" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        if [ "x$OSTYPE" != "xamd64" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-           $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/i386-freebsd/lsphp5
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-           $DLCMD $LSWS_HOME/admin/fcgi-bin/admin_php http://www.litespeedtech.com/packages/lsphp5_bin/x86_64-freebsd/lsphp5
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-       
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        if [ $? = 0 ] ; then 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-           HASADMINPHP=y
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-           echo "admin_php downloaded."
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ "x$HASADMINPHP" = "xn" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        echo -e "\033[38;5;148mStart to build php, this may take several minutes, please waiting ...\033[39m"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        $LSWS_HOME/admin/misc/build_admin_php.sh
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    else
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        chmod "$EXEC_MOD" "$LSWS_HOME/admin/fcgi-bin/admin_php"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    #final checking of existence of admin_php
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    if [ ! -f "$LSWS_HOME/admin/fcgi-bin/admin_php" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        echo -e "\033[38;5;148mFinal checking found admin_php not exists, installation abort.\033[39m"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-        exit 1
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-}
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 #script start here
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 cd `dirname "$0"`
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 source ./functions.sh 2>/dev/null
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -169,7 +90,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     echo
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     echo -e "\033[38;5;148m$LSWS_HOME/conf/httpd_config.xml exists, will be converted to $LSWS_HOME/conf/httpd_config.conf!\033[39m"
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    inst_admin_php
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     PHP_INSTALLED=y
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
     if [ -e "$LSWS_HOME/conf/httpd_config.conf" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
@@ -238,9 +158,6 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 buildConfigFiles
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 installation
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-if [ "x$PHP_INSTALLED" = "xn" ] ; then
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-    inst_admin_php
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 rm $LSWS_HOME/bin/lshttpd
Lucio Andrés Illanes Albornoz (arab, vxp) 22ed12
 ln -sf ./openlitespeed $LSWS_HOME/bin/lshttpd