|
@@ -206,7 +206,7 @@ comprobarError() {
|
|
|
error="\n$type $codeNum:\tImposible actualizar repositorio\nDetalles:\n$extraInfo.\n"
|
|
|
;;
|
|
|
806)
|
|
|
- error="$type $codeNum:\t'ufw' no instalado.\n"
|
|
|
+ error="$type $codeNum:\t'ufw' no instalado.\nDetalles:\n$extraInfo\n"
|
|
|
;;
|
|
|
807)
|
|
|
error="$type $codeNum:\t'firewall-cmd' no instalado.\n"
|
|
@@ -435,23 +435,26 @@ comprobarDependencias() {
|
|
|
echo -en " OK.\n" | tee -a $logFile
|
|
|
# Comprobamos Firewall (ufw)
|
|
|
which ufw > /dev/null 2>&1
|
|
|
- comprobarError $? 806
|
|
|
+ if [ $? -ne0 ];then
|
|
|
+ result=$(apt-get -q -y install ufw 2>&1)
|
|
|
+ comprobarError $? 806 $result
|
|
|
+ fi
|
|
|
# Comprobamos tput
|
|
|
which tput > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(apt-get -q -y ncurses-bin 2>&1)
|
|
|
+ result=$(apt-get -q -y install ncurses-bin 2>&1)
|
|
|
comprobarError $? 808 $result
|
|
|
fi
|
|
|
# Comprobar sed
|
|
|
which sed > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(apt-get -q -y sed 2>&1)
|
|
|
+ result=$(apt-get -q -y install sed 2>&1)
|
|
|
comprobarError $? 809 $result
|
|
|
fi
|
|
|
# Comprobar curl
|
|
|
which curl > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(apt-get -q -y curl 2>&1)
|
|
|
+ result=$(apt-get -q -y install curl 2>&1)
|
|
|
comprobarError $? 810 $result
|
|
|
fi
|
|
|
# Comprobamos tar, gzip, bzip2 y xz
|
|
@@ -496,19 +499,19 @@ comprobarDependencias() {
|
|
|
# Comprobamos tput
|
|
|
which tput > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(yum -y ncurses 2>&1)
|
|
|
+ result=$(yum -y install ncurses 2>&1)
|
|
|
comprobarError $? 808 $result
|
|
|
fi
|
|
|
# Comprobar sed
|
|
|
which sed > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(yum -y sed 2>&1)
|
|
|
+ result=$(yum -y install sed 2>&1)
|
|
|
comprobarError $? 809 $result
|
|
|
fi
|
|
|
# Comprobar curl
|
|
|
which curl > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ];then
|
|
|
- result=$(yum -y curl 2>&1)
|
|
|
+ result=$(yum -y install curl 2>&1)
|
|
|
comprobarError $? 810 $result
|
|
|
fi
|
|
|
# Comprobamos tar, gzip, bzip2 y xz
|