aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--etc/midbro.service9
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ff35b52..c76415b 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,7 @@ install: lib/libmidbro.so
cp -p includes/midbro.h "$(PREFIX)/include/"
cp -p lib/libmidbro.so "$(PREFIX)/lib/"
cp -p script/mid.bro "$(PREFIX)/share/midbro"
+ cp -p etc/midbro.service "/etc/systemd/system"
uninstall:
rm -f "$(PREFIX)/include/midbro.h"
diff --git a/etc/midbro.service b/etc/midbro.service
new file mode 100644
index 0000000..a9530b4
--- /dev/null
+++ b/etc/midbro.service
@@ -0,0 +1,9 @@
+[Target]
+Description=midbro
+
+[Service]
+Exec=/usr/bin/bro -b -C -i eth0 /usr/local/share/midbro/mid.bro Log::default_writer=Log::WRITER_NONE
+Restart=always
+
+[Install]
+WantedBy=multi-user.target