tpotce/installer/data/upstart/elasticpot.conf

35 lines
1.2 KiB
Text
Raw Normal View History

2016-01-15 22:11:49 +00:00
########################################################
# T-Pot #
# Elasticpot upstart script #
# #
2016-03-04 20:47:14 +00:00
# v16.03.5 by ms/mo, DTAG, 2016-03-03 #
2016-01-15 22:11:49 +00:00
########################################################
2016-02-06 03:13:32 +00:00
description "ElasticPot"
2016-01-15 22:11:49 +00:00
author "ms"
start on started docker and filesystem
stop on runlevel [!2345]
respawn
pre-start script
# Remove any existing elasticpot containers
myCID=$(docker ps -a | grep elasticpot | awk '{ print $1 }')
if [ "$myCID" != "" ];
then docker rm -v $myCID;
fi
2016-03-04 20:47:14 +00:00
# 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
2016-01-15 22:11:49 +00:00
end script
script
2016-02-11 17:52:45 +00:00
/usr/bin/docker run --name elasticpot --rm=true -v /data/elasticpot:/data/elasticpot -v /data/ews:/data/ews -p 9200:9200 dtagdevsec/elasticpot:latest1603
2016-01-15 22:11:49 +00:00
end script
post-start script
# Delay next start to avoid rapid respawning
sleep 2
2016-01-15 22:11:49 +00:00
end script