clean up, update readme

This commit is contained in:
t3chn0m4g3
2016-03-09 14:05:06 +01:00
parent 6f18240ade
commit f9e67c897c
8 changed files with 29 additions and 35 deletions

View File

@ -4,7 +4,7 @@
# T-Pot #
# Container and services restart script #
# #
# v0.04 by mo, DTAG, 2016-02-12 #
# v16.03.1 by mo, DTAG, 2016-03-09 #
########################################################
myCOUNT=1
@ -40,7 +40,7 @@ if [ $myUPTIME -gt 4 ];
do
service $i stop
done
echo "Waiting 10 seconds before restarting docker ..."
echo "### Waiting 10 seconds before restarting docker ..."
sleep 10
iptables -w -F
service docker restart
@ -56,25 +56,21 @@ if [ $myUPTIME -gt 4 ];
fi
sleep 0.1
done
echo "Docker is now up and running again."
echo "Removing obsolete container data ..."
echo "### Docker is now up and running again."
echo "### Removing obsolete container data ..."
docker rm -v $(docker ps -aq)
echo "Removing obsolete image data ..."
echo "### Removing obsolete image data ..."
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
echo "Starting T-Pot services ..."
echo "### Starting T-Pot services ..."
for i in $myIMAGES
do
service $i start
done
sleep 5
else
echo "T-Pot needs to be up and running for at least 5 minutes."
else
echo "### T-Pot needs to be up and running for at least 5 minutes."
fi
rm /var/run/check.lock
/etc/rc.local
echo "Done. Now running status.sh"
/usr/bin/status.sh