From 116e64c7aa0344a2feef1a50d099d2b2446d24e0 Mon Sep 17 00:00:00 2001
From: johannes walcher <johannes.walcher@stusta.de>
Date: Fri, 4 May 2018 13:54:11 +0200
Subject: [PATCH] added systemd files

---
 systemd/hauptbahnhof-module@.service               | 14 ++++++++++++++
 systemd/hauptbahnhof.target                        |  5 +++++
 .../hauptbahnhof-module@babel.service              |  1 +
 .../hauptbahnhof-module@hackerman.service          |  1 +
 .../hauptbahnhof-module@mpd.service                |  1 +
 .../hauptbahnhof-module@nsa.service                |  1 +
 .../hauptbahnhof-module@rupprecht.service          |  1 +
 7 files changed, 24 insertions(+)
 create mode 100644 systemd/hauptbahnhof-module@.service
 create mode 100644 systemd/hauptbahnhof.target
 create mode 120000 systemd/hauptbahnhof.target.wants/hauptbahnhof-module@babel.service
 create mode 120000 systemd/hauptbahnhof.target.wants/hauptbahnhof-module@hackerman.service
 create mode 120000 systemd/hauptbahnhof.target.wants/hauptbahnhof-module@mpd.service
 create mode 120000 systemd/hauptbahnhof.target.wants/hauptbahnhof-module@nsa.service
 create mode 120000 systemd/hauptbahnhof.target.wants/hauptbahnhof-module@rupprecht.service

diff --git a/systemd/hauptbahnhof-module@.service b/systemd/hauptbahnhof-module@.service
new file mode 100644
index 0000000..282a6b1
--- /dev/null
+++ b/systemd/hauptbahnhof-module@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Hauptbahnhof %i-Module
+After=network.target
+Before=hauptbahnhof.service
+
+[Service]
+Type=simple
+User=johannes
+WorkingDirectory=/usr/local/bin/hauptbahnhof
+ExecStart=/usr/local/bin/hauptbahnhof/venv/bin/python3 -m %i
+
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/hauptbahnhof.target b/systemd/hauptbahnhof.target
new file mode 100644
index 0000000..4422514
--- /dev/null
+++ b/systemd/hauptbahnhof.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Hauptbahnhof Hackerspace Control System
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@babel.service b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@babel.service
new file mode 120000
index 0000000..4761512
--- /dev/null
+++ b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@babel.service
@@ -0,0 +1 @@
+../hauptbahnhof-module@.service
\ No newline at end of file
diff --git a/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@hackerman.service b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@hackerman.service
new file mode 120000
index 0000000..4761512
--- /dev/null
+++ b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@hackerman.service
@@ -0,0 +1 @@
+../hauptbahnhof-module@.service
\ No newline at end of file
diff --git a/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@mpd.service b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@mpd.service
new file mode 120000
index 0000000..4761512
--- /dev/null
+++ b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@mpd.service
@@ -0,0 +1 @@
+../hauptbahnhof-module@.service
\ No newline at end of file
diff --git a/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@nsa.service b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@nsa.service
new file mode 120000
index 0000000..4761512
--- /dev/null
+++ b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@nsa.service
@@ -0,0 +1 @@
+../hauptbahnhof-module@.service
\ No newline at end of file
diff --git a/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@rupprecht.service b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@rupprecht.service
new file mode 120000
index 0000000..4761512
--- /dev/null
+++ b/systemd/hauptbahnhof.target.wants/hauptbahnhof-module@rupprecht.service
@@ -0,0 +1 @@
+../hauptbahnhof-module@.service
\ No newline at end of file
-- 
GitLab