tpotce/installer/upstart/suricata.conf

32 lines
1.1 KiB
Text
Raw Normal View History

2015-01-27 16:46:52 +00:00
########################################################
2015-12-08 14:47:39 +00:00
# T-Pot #
2015-01-27 16:46:52 +00:00
# Suricata upstart script #
# #
2015-12-08 14:47:39 +00:00
# v0.04 by mo, DTAG, 2015-12-08 #
2015-01-27 16:46:52 +00:00
########################################################
description "Suricata"
author "mo"
start on (started docker and filesystem)
2015-01-27 16:46:52 +00:00
stop on runlevel [!2345]
respawn
pre-start script
# Remove any existing suricata containers
myCID=$(docker ps -a | grep suricata | awk '{ print $1 }')
if [ "$myCID" != "" ];
2015-08-07 20:32:15 +00:00
then docker rm -v $myCID;
2015-01-27 16:46:52 +00:00
fi
myIF=$(route | grep default | awk '{ print $8 }')
/sbin/ethtool --offload $myIF rx off tx off
/sbin/ethtool -K $myIF gso off gro off
/sbin/ip link set $myIF promisc on
end script
script
# Delayed start to avoid rapid respawning
2015-08-07 20:32:15 +00:00
sleep $(((RANDOM % 5)+5))
2015-12-08 14:47:39 +00:00
/usr/bin/docker run --name suricata --cap-add=NET_ADMIN --net=host --rm=true -v /data:/data dtagdevsec/suricata:latest1603
2015-01-27 16:46:52 +00:00
end script
post-start script
sleep $(((RANDOM % 5)+5))
end script