mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 03:38:51 +00:00
neatify two installer widgets
This commit is contained in:
parent
66dd2398e8
commit
50a93f5abf
1 changed files with 11 additions and 8 deletions
|
@ -70,10 +70,13 @@ systemctl stop docker 2>&1 | dialog --title "[ Stop docker service ]" $myPROGRES
|
||||||
systemctl start docker 2>&1 | dialog --title "[ Start docker service ]" $myPROGRESSBOXCONF
|
systemctl start docker 2>&1 | dialog --title "[ Start docker service ]" $myPROGRESSBOXCONF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Let's test internet connection
|
# Let's test the internet connection
|
||||||
|
mySITESCOUNT=$(echo $mySITES | wc -w)
|
||||||
|
j=0
|
||||||
for i in $mySITES;
|
for i in $mySITES;
|
||||||
do
|
do
|
||||||
dialog --title "[ Availability check for $i ]" $myPROGRESSBOXCONF <<EOF
|
let j+=1
|
||||||
|
dialog --title "[ Availability check for $i ]" --backtitle "$myBACKTITLE" --gauge "" 6 80 $(expr 100 \* $j / $mySITESCOUNT) <<EOF
|
||||||
EOF
|
EOF
|
||||||
curl --connect-timeout 5 -IsS $i 2>&1>/dev/null
|
curl --connect-timeout 5 -IsS $i 2>&1>/dev/null
|
||||||
if [ $? -ne 0 ];
|
if [ $? -ne 0 ];
|
||||||
|
@ -136,11 +139,6 @@ while [ "$myPASS1" != "$myPASS2" ]
|
||||||
done
|
done
|
||||||
htpasswd -b -c /etc/nginx/nginxpasswd "$myUSER" "$myPASS1" 2>&1 | dialog --title "[ Setting up user and password ]" $myPROGRESSBOXCONF;
|
htpasswd -b -c /etc/nginx/nginxpasswd "$myUSER" "$myPASS1" 2>&1 | dialog --title "[ Setting up user and password ]" $myPROGRESSBOXCONF;
|
||||||
|
|
||||||
# Let's log for the beauty of it
|
|
||||||
#set -e
|
|
||||||
#exec 2> >(tee "install.err")
|
|
||||||
#exec > >(tee "install.log")
|
|
||||||
|
|
||||||
# Let's generate a SSL self-signed certificate without interaction (browsers will see it invalid anyway)
|
# Let's generate a SSL self-signed certificate without interaction (browsers will see it invalid anyway)
|
||||||
mkdir -p /etc/nginx/ssl 2>&1 | dialog --title "[ Generating a self-signed-certificate for NGINX ]" $myPROGRESSBOXCONF;
|
mkdir -p /etc/nginx/ssl 2>&1 | dialog --title "[ Generating a self-signed-certificate for NGINX ]" $myPROGRESSBOXCONF;
|
||||||
openssl req \
|
openssl req \
|
||||||
|
@ -312,9 +310,14 @@ case $myFLAVOR in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Let's load docker images
|
# Let's load docker images
|
||||||
|
myIMAGESCOUNT=$(cat /root/tpot/data/images.conf | wc -w)
|
||||||
|
j=0
|
||||||
for name in $(cat /root/tpot/data/images.conf)
|
for name in $(cat /root/tpot/data/images.conf)
|
||||||
do
|
do
|
||||||
docker pull dtagdevsec/$name:1706 2>&1 | dialog --title "[ Downloading docker image dtagdevsec/$name:1706 ]" $myPROGRESSBOXCONF
|
dialog --title "[ Downloading docker image dtagdevsec/$name:1706 ]" --backtitle "$myBACKTITLE" --gauge "" 6 80 $(expr 100 \* $j / $myIMAGESCOUNT) <<EOF
|
||||||
|
EOF
|
||||||
|
docker pull dtagdevsec/$name:1706 2>&1>/dev/null
|
||||||
|
let j+=1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Let's add the daily update check with a weekly clean interval
|
# Let's add the daily update check with a weekly clean interval
|
||||||
|
|
Loading…
Reference in a new issue