diff options
author | ramon <ramongomez@us.es> | 2014-04-16 11:11:16 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2014-04-16 11:11:16 +0000 |
commit | f9e3393845ded1cf93f61277ae3b2e9348e14c9a (patch) | |
tree | 33eb2ba3614b471738e3834aa62f20bbf270749f /installer | |
parent | b97f2dc35edde578a0802b50615b1edcf0c899bf (diff) |
#616: Instalador compatible con configuración de Apache 2.4 y de versiones anteriores.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4237 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_installer.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index b20177c3..eecd5745 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1099,8 +1099,8 @@ function installWebConsoleApacheConf() exit 1 fi - local path_opengnsys_base=$1 - local path_apache2_confd=$2 + local path_opengnsys_base="$1" + local path_apache2_confd="$2" local CONSOLEDIR=${path_opengnsys_base}/www if [ ! -d $path_apache2_confd ]; then @@ -1118,10 +1118,17 @@ function installWebConsoleApacheConf() $APACHEMAKECERT # Genera configuración de consola web a partir del fichero plantilla. - sed -e "s/CONSOLEDIR/${CONSOLEDIR//\//\\/}/g" \ - $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_opengnsys_base/etc/apache.conf - - ln -fs $path_opengnsys_base/etc/apache.conf $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf + if [ -n "$(apachectl -v | grep "2\.[0-2]")" ]; then + # Configuración para versiones anteriores de Apache. + sed -e "s/CONSOLEDIR/${CONSOLEDIR//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/apache-prev2.4.conf.tmpl > $path_opengnsys_base/etc/apache.conf + ln -fs $path_opengnsys_base/etc/apache.conf $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE} + else + # Configuración específica a partir de Apache 2.4 + sed -e "s/CONSOLEDIR/${CONSOLEDIR//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_opengnsys_base/etc/apache.conf + ln -fs $path_opengnsys_base/etc/apache.conf $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf + fi $APACHEENABLEOG if [ $? -ne 0 ]; then errorAndLog "${FUNCNAME}(): config file can't be linked to apache conf, verify your server installation" |