summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-03-02 11:06:23 +0000
committerramon <ramongomez@us.es>2017-03-02 11:06:23 +0000
commit103bc8272567329aa76d4d0a13ffa521e30a6bdf (patch)
tree3d7d20e3c7e164d471e75c11d310b2c4323f1cc9
parent8601c6254afa64696bae53f6023c85f21c937e54 (diff)
#718: Instalador y actualizador configuran tipo MIME para que descargar paquetes macOS como binarios.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5217 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-xinstaller/opengnsys_installer.sh12
-rwxr-xr-xinstaller/opengnsys_update.sh3
2 files changed, 8 insertions, 7 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index bdcc568d..19163e41 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -1100,7 +1100,8 @@ function installWebConsoleApacheConf()
$APACHEMAKECERT
# Activar módulo Rewrite.
$APACHEREWRITEMOD
-
+ # Definir ficheros .pkg como binarios para descargar paquetes macOS.
+ sed -i '/pkg/! s/octet-stream\(.*\)/octet-stream\1 pkg/' /etc/mime-types
# Genera configuración de consola web a partir del fichero plantilla.
if [ -n "$(apachectl -v | grep "2\.[0-2]")" ]; then
# Configuración para versiones anteriores de Apache.
@@ -1115,12 +1116,11 @@ function installWebConsoleApacheConf()
if [ $? -ne 0 ]; then
errorAndLog "${FUNCNAME}(): config file can't be linked to apache conf, verify your server installation"
return 1
- else
- echoAndLog "${FUNCNAME}(): config file created and linked, restarting apache daemon"
- service=$APACHESERV
- $ENABLESERVICE; $STARTSERVICE
- return 0
fi
+ echoAndLog "${FUNCNAME}(): config file created and linked, restarting apache daemon"
+ service=$APACHESERV
+ $ENABLESERVICE; $STARTSERVICE
+ return 0
}
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index d95d1bcc..fef3a1d4 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -460,7 +460,8 @@ function apacheConfiguration ()
echoAndLog "${FUNCNAME}(): Configuring Apache modules."
sed -i '/rewrite/s/^#//' $APACHECFGDIR/*.conf
fi
-
+ # Definir ficheros .pkg como binarios para descargar paquetes macOS.
+ sed -i '/pkg/! s/octet-stream\(.*\)/octet-stream\1 pkg/' /etc/mime-types
# Actualizar configuración para acceso a API REST
# (solo actualizaciones de 1.0.x a 1.1.x).
for config in $APACHECFGDIR/{,sites-available/}opengnsys.conf ]; do