Commit de056b6d authored by Jan Pavlinec's avatar Jan Pavlinec

ludus: update init script

parent 2d6462e7
...@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ...@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ludus PKG_NAME:=ludus
PKG_VERSION:=0.8 PKG_VERSION:=0.8
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/stratosphereips/Ludus.git PKG_SOURCE_URL:=https://github.com/stratosphereips/Ludus.git
......
...@@ -40,6 +40,7 @@ get_public_ip() { ...@@ -40,6 +40,7 @@ get_public_ip() {
copy_suricata_normal_rules() { copy_suricata_normal_rules() {
local rules="http-events.rules smtp-events.rules dns-events.rules tls-events.rules" local rules="http-events.rules smtp-events.rules dns-events.rules tls-events.rules"
print_msg "Copying normal suricata rules." print_msg "Copying normal suricata rules."
mkdir -p "$SURICATA_RULES_DIR"
for i in $rules; do for i in $rules; do
if [ -f "$SURICATA_NORMAL_RULES_DIR/$i" ]; then if [ -f "$SURICATA_NORMAL_RULES_DIR/$i" ]; then
cp "$SURICATA_NORMAL_RULES_DIR/$i" "$SURICATA_RULES_DIR/" cp "$SURICATA_NORMAL_RULES_DIR/$i" "$SURICATA_RULES_DIR/"
...@@ -102,7 +103,8 @@ start_service() { ...@@ -102,7 +103,8 @@ start_service() {
# Create suricata log dir # Create suricata log dir
mkdir -p "$SURICATA_LOG_DIR" mkdir -p "$SURICATA_LOG_DIR"
if [ ! -d "/tmp/suricata/rules" ]; then
if [ ! -f "/tmp/suricata/rules.md5" ] || [ ! "$(grep -q '[^[:space:]]' /tmp/suricata/rules.md5)" ]; then
print_msg "Warning /tmp/suricata/rules not found ! Suricata-emergingthreats-rules is probably not running." print_msg "Warning /tmp/suricata/rules not found ! Suricata-emergingthreats-rules is probably not running."
if [ -f "/usr/bin/suricata_update_rules.sh" ]; then if [ -f "/usr/bin/suricata_update_rules.sh" ]; then
print_msg "Trying to run suricata_update_rules.sh" print_msg "Trying to run suricata_update_rules.sh"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment