Skip to content

Commit

Permalink
debian: Import patch from PR glidernet#25
Browse files Browse the repository at this point in the history
  • Loading branch information
kerel-fs committed Feb 16, 2017
1 parent c9845cd commit f23277b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
From 2d5ae0932b8421d0b9cbd1d61bcc93cce7536aae Mon Sep 17 00:00:00 2001
From: "Fabian P. Schmidt" <[email protected]>
Date: Thu, 16 Feb 2017 09:38:26 +0100
Subject: [PATCH] Add systemd units for ogn-decode and ogn-rf

---
scripts/ogn-decode.service | 11 +++++++++++
scripts/ogn-decode.socket | 6 ++++++
scripts/ogn-rf.service | 11 +++++++++++
3 files changed, 28 insertions(+)
create mode 100644 scripts/ogn-decode.service
create mode 100644 scripts/ogn-decode.socket
create mode 100644 scripts/ogn-rf.service

diff --git a/scripts/ogn-decode.service b/scripts/ogn-decode.service
new file mode 100644
index 0000000..f2374e3
--- /dev/null
+++ b/scripts/ogn-decode.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Decode ogn/flarm data given by a fifo and forward it to glidernet.org
+After=network.target time-sync.target
+
+[Service]
+User=ogn
+ExecStart=/usr/bin/ogn-decode /etc/rtlsdr-ogn.conf
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/scripts/ogn-decode.socket b/scripts/ogn-decode.socket
new file mode 100644
index 0000000..5ad1405
--- /dev/null
+++ b/scripts/ogn-decode.socket
@@ -0,0 +1,6 @@
+[Socket]
+ListenFIFO=/var/run/ogn-decode.fifo
+SocketUser=ogn
+
+[Install]
+WantedBy=sockets.target
diff --git a/scripts/ogn-rf.service b/scripts/ogn-rf.service
new file mode 100644
index 0000000..5066056
--- /dev/null
+++ b/scripts/ogn-rf.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Receive ogn/flarm data and write the raw data to a fifo
+After=network.target time-sync.target
+
+[Service]
+User=ogn
+ExecStart=/usr/bin/ogn-rf /etc/rtlsdr-ogn.conf
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
--
2.1.4

1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
0002-Move-version-string-from-Makefile-to-VERSION.txt.patch
0003-Improve-Makefile.patch
0004-Makefile-Add-all-to-phony-targets.patch
0001-Add-systemd-units-for-ogn-decode-and-ogn-rf.patch
0001-Add-rtlsdr-ogn.conf-conffile.patch
0001-ogn-rf-Detect-if-stdin-is-a-terminal.patch

0 comments on commit f23277b

Please sign in to comment.