mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
conpot - support persistence
This commit is contained in:
parent
1089993579
commit
68556e8651
1 changed files with 9 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
# T-Pot #
|
# T-Pot #
|
||||||
# ConPot upstart script #
|
# ConPot upstart script #
|
||||||
# #
|
# #
|
||||||
# v16.03.1 by mo, DTAG, 2016-02-19 #
|
# v16.03.2 by mo, DTAG, 2016-03-02 #
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
description "ConPot"
|
description "ConPot"
|
||||||
|
@ -16,11 +16,14 @@ pre-start script
|
||||||
if [ "$myCID" != "" ];
|
if [ "$myCID" != "" ];
|
||||||
then docker rm -v $myCID;
|
then docker rm -v $myCID;
|
||||||
fi
|
fi
|
||||||
# Remove any data from previous container
|
# Remove any data from previous container if persistence is not enabled
|
||||||
rm -rf /data/conpot/* || true
|
if ! [ -f /data/persistence.on ];
|
||||||
mkdir -p /data/conpot/log
|
then
|
||||||
chmod 760 /data/conpot -R
|
rm -rf /data/conpot/* || true
|
||||||
chown tpot:tpot /data/conpot -R
|
mkdir -p /data/conpot/log
|
||||||
|
chmod 760 /data/conpot -R
|
||||||
|
chown tpot:tpot /data/conpot -R
|
||||||
|
fi
|
||||||
end script
|
end script
|
||||||
script
|
script
|
||||||
/usr/bin/docker run --name conpot --rm=true -v /data/conpot:/data/conpot -v /data/ews:/data/ews -p 81:80 -p 102:102 -p 161:161/udp -p 502:502 dtagdevsec/conpot:latest1603
|
/usr/bin/docker run --name conpot --rm=true -v /data/conpot:/data/conpot -v /data/ews:/data/ews -p 81:80 -p 102:102 -p 161:161/udp -p 502:502 dtagdevsec/conpot:latest1603
|
||||||
|
|
Loading…
Reference in a new issue