From cbccc7c83f1e19597f38fc9485c35315f582e05c Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Mon, 8 Feb 2016 15:03:56 +0100 Subject: [PATCH] include emobility --- installer/data/upstart/emobility.conf | 30 +++++++++++++++++++++++++++ installer/install.sh | 5 +++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 installer/data/upstart/emobility.conf diff --git a/installer/data/upstart/emobility.conf b/installer/data/upstart/emobility.conf new file mode 100644 index 00000000..0b1d461f --- /dev/null +++ b/installer/data/upstart/emobility.conf @@ -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 diff --git a/installer/install.sh b/installer/install.sh index dcbf0c10..36b5142e 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -275,12 +275,13 @@ EOF # Let's create some files and folders fuECHO "### Creating some files and folders." -mkdir -p /data/ews/log /data/ews/conf /data/ews/dionaea /data/ews/glastopf /data/ews/honeytrap \ +mkdir -p /data/ews/log /data/ews/conf /data/ews/dionaea /data/ews/emobility \ /data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/ \ - /data/elasticpot /data/elasticpot/log \ + /data/elasticpot/log \ /data/dionaea/log /data/dionaea/bistreams /data/dionaea/binaries /data/dionaea/rtp /data/dionaea/wwwroot \ /data/elk/data /data/elk/log /data/glastopf /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/ \ /data/suricata/log /home/tsec/.ssh/ \ + /data/emobility/log \ /etc/init/t-pot # Let's take care of some files and permissions before copying