mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
tweaking
This commit is contained in:
parent
0e3afd9642
commit
d1850e34c7
1 changed files with 26 additions and 21 deletions
|
@ -241,28 +241,31 @@ EOF
|
||||||
|
|
||||||
# Check if remote sites are available
|
# Check if remote sites are available
|
||||||
function fuCHECKNET {
|
function fuCHECKNET {
|
||||||
local mySITES="$1"
|
if [ "$myTPOT_DEPLOYMENT_TYPE" == "iso" ] || [ "$myTPOT_DEPLOYMENT_TYPE" == "user" ];
|
||||||
local myBACKTITLE="Availability check"
|
then
|
||||||
mySITESCOUNT=$(echo $mySITES | wc -w)
|
local mySITES="$1"
|
||||||
j=0
|
local myBACKTITLE="Availability check"
|
||||||
for i in $mySITES;
|
mySITESCOUNT=$(echo $mySITES | wc -w)
|
||||||
do
|
j=0
|
||||||
echo $(expr 100 \* $j / $mySITESCOUNT) | dialog --title "[ Availability check ]" --backtitle "$myBACKTITLE" --gauge "\n Now checking: $i\n" 8 80
|
for i in $mySITES;
|
||||||
curl --connect-timeout 30 -IsS $i 2>&1>/dev/null
|
do
|
||||||
if [ $? -ne 0 ];
|
echo $(expr 100 \* $j / $mySITESCOUNT) | dialog --title "[ Availability check ]" --backtitle "$myBACKTITLE" --gauge "\n Now checking: $i\n" 8 80
|
||||||
then
|
curl --connect-timeout 30 -IsS $i 2>&1>/dev/null
|
||||||
dialog --keep-window --backtitle "$myBACKTITLE" --title "[ Continue? ]" --yesno "\nAvailability check failed. You can continue, but the installation might fail." 10 50
|
if [ $? -ne 0 ];
|
||||||
if [ $? = 1 ];
|
|
||||||
then
|
then
|
||||||
dialog --keep-window --backtitle "$myBACKTITLE" --title "[ Abort ]" --msgbox "\nInstallation aborted. Exiting the installer." 7 50
|
dialog --keep-window --backtitle "$myBACKTITLE" --title "[ Continue? ]" --yesno "\nAvailability check failed. You can continue, but the installation might fail." 10 50
|
||||||
exit
|
if [ $? = 1 ];
|
||||||
else
|
then
|
||||||
break;
|
dialog --keep-window --backtitle "$myBACKTITLE" --title "[ Abort ]" --msgbox "\nInstallation aborted. Exiting the installer." 7 50
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
fi;
|
||||||
fi;
|
fi;
|
||||||
fi;
|
let j+=1
|
||||||
let j+=1
|
echo $(expr 100 \* $j / $mySITESCOUNT) | dialog --keep-window --title "[ Availability check ]" --backtitle "$myBACKTITLE" --gauge "\n Now checking: $i\n" 8 80
|
||||||
echo $(expr 100 \* $j / $mySITESCOUNT) | dialog --keep-window --title "[ Availability check ]" --backtitle "$myBACKTITLE" --gauge "\n Now checking: $i\n" 8 80
|
done;
|
||||||
done;
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install T-Pot dependencies
|
# Install T-Pot dependencies
|
||||||
|
@ -318,7 +321,6 @@ fi
|
||||||
############################
|
############################
|
||||||
fuGOT_ROOT
|
fuGOT_ROOT
|
||||||
fuCHECKPACKAGES "$myPREINSTALLPACKAGES"
|
fuCHECKPACKAGES "$myPREINSTALLPACKAGES"
|
||||||
fuCHECKNET "$myREMOTESITES"
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# IV. Prepare installer environment #
|
# IV. Prepare installer environment #
|
||||||
|
@ -418,6 +420,9 @@ if [ "$myTPOT_DEPLOYMENT_TYPE" == "iso" ];
|
||||||
dialog --keep-window --no-ok --no-cancel --backtitle "$myBACKTITLE" --title "[ Wait to avoid interference with service messages ]" --pause "" 6 80 7
|
dialog --keep-window --no-ok --no-cancel --backtitle "$myBACKTITLE" --title "[ Wait to avoid interference with service messages ]" --pause "" 6 80 7
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if remote sites are available
|
||||||
|
fuCHECKNET "$myREMOTESITES"
|
||||||
|
|
||||||
# Let' s load the iso config file if there is one
|
# Let' s load the iso config file if there is one
|
||||||
if [ -f $myCONF_FILE ];
|
if [ -f $myCONF_FILE ];
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue