From 68556e8651a0f1dbe36efcc7eac695cbb274672a Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Wed, 2 Mar 2016 17:12:58 +0100 Subject: [PATCH] conpot - support persistence --- installer/data/upstart/conpot.conf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/installer/data/upstart/conpot.conf b/installer/data/upstart/conpot.conf index 8f85b16d..bb51b86a 100644 --- a/installer/data/upstart/conpot.conf +++ b/installer/data/upstart/conpot.conf @@ -2,7 +2,7 @@ # T-Pot # # ConPot upstart script # # # -# v16.03.1 by mo, DTAG, 2016-02-19 # +# v16.03.2 by mo, DTAG, 2016-03-02 # ######################################################## description "ConPot" @@ -16,11 +16,14 @@ pre-start script if [ "$myCID" != "" ]; then docker rm -v $myCID; fi - # Remove any data from previous container - rm -rf /data/conpot/* || true - mkdir -p /data/conpot/log - chmod 760 /data/conpot -R - chown tpot:tpot /data/conpot -R + # Remove any data from previous container if persistence is not enabled + if ! [ -f /data/persistence.on ]; + then + rm -rf /data/conpot/* || true + mkdir -p /data/conpot/log + chmod 760 /data/conpot -R + chown tpot:tpot /data/conpot -R + fi end 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