consider commented config lines

This commit is contained in:
Marco Ochse
2017-06-07 16:24:42 +00:00
parent 66cdb0e60a
commit a1bc127698
3 changed files with 3 additions and 48 deletions

View File

@ -7,7 +7,7 @@ function fuCLEANUP {
trap fuCLEANUP EXIT
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
do
echo ""

View File

@ -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