mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-28 19:28:50 +00:00
33 lines
1.2 KiB
Text
33 lines
1.2 KiB
Text
########################################################
|
|
# T-Pot #
|
|
# eMobility upstart script #
|
|
# #
|
|
# v16.03.1 by ms / mo, DTAG, 2016-03-03 #
|
|
########################################################
|
|
|
|
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 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
|
|
sleep 2
|
|
/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
|