tweaking, persistence

This commit is contained in:
t3chn0m4g3
2016-03-04 21:47:14 +01:00
parent a7f98902e3
commit 2d5c498860
6 changed files with 55 additions and 34 deletions

View File

@ -2,7 +2,7 @@
# T-Pot #
# Elasticpot upstart script #
# #
# v16.03.4 by ms/mo, DTAG, 2016-02-08 #
# v16.03.5 by ms/mo, DTAG, 2016-03-03 #
########################################################
description "ElasticPot"
@ -16,11 +16,14 @@ pre-start script
if [ "$myCID" != "" ];
then docker rm -v $myCID;
fi
# Remove any data from previous container
rm -rf /data/elasticpot/* || true
mkdir -p /data/elasticpot/log
chmod 760 /data/elasticpot -R
chown tpot:tpot /data/elasticpot -R
# Remove any data from previous container if persistence is not enabled
if ! [ -f /data/persistence.on ];
then
rm -rf /data/elasticpot/* || true
mkdir -p /data/elasticpot/log
chmod 760 /data/elasticpot -R
chown tpot:tpot /data/elasticpot -R
fi
end script
script
/usr/bin/docker run --name elasticpot --rm=true -v /data/elasticpot:/data/elasticpot -v /data/ews:/data/ews -p 9200:9200 dtagdevsec/elasticpot:latest1603