include emobility

This commit is contained in:
Marco Ochse
2016-02-08 15:03:56 +01:00
parent 8165e8f91f
commit cbccc7c83f
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,30 @@
########################################################
# T-Pot Community Edition #
# Conpot upstart script #
# #
# v0.50 by msbeiti, DTAG, 2015-08-05 #
########################################################
description "emobility"
author "ms"
start on started docker and filesystem
stop on runlevel [!2345]
respawn
pre-start script
# Remove any existing emobility containers
myCID=$(docker ps -a | grep emobility | awk '{ print $1 }')
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
end script
script
# Delayed start to avoid rapid respawning
sleep $(((RANDOM % 5)+5))
/usr/bin/docker run --name emobility --cap-add=NET_ADMIN -p 8080:8080 -v /data/emobility:/data/eMobility -v /data/ews:/data/ews --rm=true dtagdevsec/emobility:latest1603
end script