|
@@ -55,6 +55,9 @@ comprobarError() {
|
|
|
type="WARNING"
|
|
|
error="\n$type $codeNum:\tImposible instalar 'info.php'.\n"
|
|
|
;;
|
|
|
+ 107)
|
|
|
+ error="\n$type $codeNum:\tError al configurar Nginx.\n"
|
|
|
+ ;;
|
|
|
200)
|
|
|
error="$type $codeNum:\tError interno (selección de base de datos).\n"
|
|
|
;;
|
|
@@ -452,20 +455,37 @@ instalarNginx() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+configurarNginx() {
|
|
|
+ # Configuramos Nginx
|
|
|
+ rm -Rf /etc/nginx/* 2>/dev/null
|
|
|
+ comprobarError $? 107
|
|
|
+ if [ $debianOS = true ];then
|
|
|
+ nginxConfFile="./etc/nginx-debian/*"
|
|
|
+ elif [ $rhelOS = true ];then
|
|
|
+ nginxConfFile="./etc/nginx-rhel/*"
|
|
|
+ fi
|
|
|
+ if [ ! -f $nginxConfFile ];then
|
|
|
+ comprobarError 1 107
|
|
|
+ fi
|
|
|
+ cp -R $nginxConfFile /etc/nginx/ 2>/dev/null
|
|
|
+ comprobarError $? 107
|
|
|
+ unset nginxConfFile
|
|
|
+}
|
|
|
+
|
|
|
mostrarDatabase() {
|
|
|
if [ $debianOS = true ]; then
|
|
|
database=$(whiptail --title "BASE DE DATOS" --radiolist "<ESPACIO>: seleccionar <TAB>: cambiar <FLECHAS>: moverse\n\nEscoge la base de datos que quieres usar:" $((ALTO * 9 / 10)) $((ANCHO * 9 / 10)) 2 \
|
|
|
- "MySQL" "Instalar la base de datos MySQL (no uso comercial)" ON \
|
|
|
- "MariaDB" "Instalar la base de datos MariaDB (fork de MySQL)" OFF \
|
|
|
+ "MariaDB" "Instalar la base de datos MariaDB (fork de MySQL)" ON \
|
|
|
+ "MySQL" "Instalar la base de datos MySQL (no para uso comercial)" OFF \
|
|
|
--ok-button "Continuar" --cancel-button "Salir" 3>&1 1>&2 2>&3)
|
|
|
comprobarError $? 1
|
|
|
case $database in
|
|
|
- MySQL)
|
|
|
- mySQLOn=true
|
|
|
- ;;
|
|
|
MariaDB)
|
|
|
mariaDBOn=true
|
|
|
;;
|
|
|
+ MySQL)
|
|
|
+ mySQLOn=true
|
|
|
+ ;;
|
|
|
*)
|
|
|
comprobarError 1 200
|
|
|
;;
|
|
@@ -871,7 +891,7 @@ mostrarExpress
|
|
|
echo -en "Configurando Servidor Web..." | tee -a $logFile
|
|
|
# {
|
|
|
# echo -en "%s\n" $((100 * progreso / progresoTotal))
|
|
|
- sleep 2
|
|
|
+ configurarNginx
|
|
|
progreso=$((progreso + 1))
|
|
|
# } > >(whiptail --gauge "Configurando Servidor Web..." $((ALTO * 4 / 10)) $((ANCHO * 9 / 10)) $((100 * progreso / progresoTotal)))
|
|
|
echo -en " OK.\n" | tee -a $logFile
|