mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
consider commented config lines
This commit is contained in:
parent
66cdb0e60a
commit
a1bc127698
3 changed files with 3 additions and 48 deletions
|
@ -7,7 +7,7 @@ function fuCLEANUP {
|
||||||
trap fuCLEANUP EXIT
|
trap fuCLEANUP EXIT
|
||||||
|
|
||||||
stty -echo -icanon time 0 min 0
|
stty -echo -icanon time 0 min 0
|
||||||
myIMAGES=$(cat /etc/tpot/tpot.yml | grep container_name | cut -d: -f2)
|
myIMAGES=$(cat /etc/tpot/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2)
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
echo "[0;0m"
|
echo "[0;0m"
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Show status of SupervisorD within running containers
|
|
||||||
myCOUNT=1
|
|
||||||
|
|
||||||
if [[ $1 == "" ]]
|
|
||||||
then
|
|
||||||
myIMAGES=$(cat /etc/tpot/tpot.yml | grep container_name | cut -d: -f2)
|
|
||||||
else myIMAGES=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
if ! [ -a /var/run/check.lock ];
|
|
||||||
then break
|
|
||||||
fi
|
|
||||||
sleep 0.1
|
|
||||||
if [ $myCOUNT = 1 ];
|
|
||||||
then
|
|
||||||
echo -n "Waiting for services "
|
|
||||||
else echo -n .
|
|
||||||
fi
|
|
||||||
if [ $myCOUNT = 300 ];
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "Services are busy or not available. Please retry later."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
myCOUNT=$[$myCOUNT +1]
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "======| System |======"
|
|
||||||
echo Date:" "$(date)
|
|
||||||
echo Uptime:" "$(uptime)
|
|
||||||
echo CPU temp: $(sensors | grep "Physical" | awk '{ print $4 }')
|
|
||||||
echo
|
|
||||||
for i in $myIMAGES
|
|
||||||
do
|
|
||||||
if [ "$i" != "ui-for-docker" ] && [ "$i" != "netdata" ] && [ "$i" != "spiderfoot" ];
|
|
||||||
then
|
|
||||||
echo "======| Container:" $i "|======"
|
|
||||||
docker exec $i supervisorctl status | GREP_COLORS='mt=01;32' egrep --color=always "(RUNNING)|$" | GREP_COLORS='mt=01;31' egrep --color=always "(STOPPED|FATAL)|$"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -381,9 +381,9 @@ case $myFLAVOR in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Let's load docker images
|
# Let's load docker images
|
||||||
myIMAGESCOUNT=$(cat /root/tpot/etc/tpot/tpot.yml | grep container_name | cut -d: -f2 | wc -l)
|
myIMAGESCOUNT=$(cat /root/tpot/etc/tpot/tpot.yml | grep -v '#' | grep image | cut -d: -f2 | wc -l)
|
||||||
j=0
|
j=0
|
||||||
for name in $(cat /root/tpot/etc/tpot/tpot.yml | grep image | cut -d'"' -f2)
|
for name in $(cat /root/tpot/etc/tpot/tpot.yml | grep -v '#' | grep image | cut -d'"' -f2)
|
||||||
do
|
do
|
||||||
dialog --title "[ Downloading docker images, please be patient ]" --backtitle "$myBACKTITLE" \
|
dialog --title "[ Downloading docker images, please be patient ]" --backtitle "$myBACKTITLE" \
|
||||||
--gauge "\n Now downloading: $name\n" 8 80 $(expr 100 \* $j / $myIMAGESCOUNT) <<EOF
|
--gauge "\n Now downloading: $name\n" 8 80 $(expr 100 \* $j / $myIMAGESCOUNT) <<EOF
|
||||||
|
|
Loading…
Reference in a new issue