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

@ -1,8 +1,8 @@
########################################################
# T-Pot Community Edition #
# Conpot upstart script #
# T-Pot #
# eMobility upstart script #
# #
# v0.50 by msbeiti, DTAG, 2015-08-05 #
# v16.03.1 by ms / mo, DTAG, 2016-03-03 #
########################################################
description "emobility"
@ -16,12 +16,15 @@ pre-start script
if [ "$myCID" != "" ];
then docker rm $myCID;
fi
# Remove any data from previous container
rm -rf /data/emobility/* || true
rm /data/ews/emobility/ews.json || true
mkdir -p /data/emobility/log /data/ews/emobility
chmod 760 /data/emobility -R
chown tpot:tpot /data/emobility -R
# Remove any data from previous container if persistence is not enabled
if ! [ -f /data/persistence.on ];
then
rm -rf /data/emobility/* || true
rm /data/ews/emobility/ews.json || true
mkdir -p /data/emobility/log /data/ews/emobility
chmod 760 /data/emobility -R
chown tpot:tpot /data/emobility -R
fi
end script
script
# Delayed start to avoid rapid respawning