aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-03-27 17:58:16 +0200
committerRobin Krahl <me@robin-krahl.de>2018-03-27 17:58:16 +0200
commit9a3560ba07404cbf7ff1c4923ef3a54a8f1be552 (patch)
tree03cc0f8a2a9d0d9bc263979612d32daadcd94100
parentd15f9aae0f0fbfc5add718e5a8fc8f90835e3f6a (diff)
downloadmidbro-9a3560ba07404cbf7ff1c4923ef3a54a8f1be552.tar.gz
midbro-9a3560ba07404cbf7ff1c4923ef3a54a8f1be552.tar.bz2
Add systemd service for midbro
-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