diff --git a/debian/patches/0001-Add-systemd-units-for-ogn-decode-and-ogn-rf.patch b/debian/patches/0001-Add-systemd-units-for-ogn-decode-and-ogn-rf.patch new file mode 100644 index 0000000..810118c --- /dev/null +++ b/debian/patches/0001-Add-systemd-units-for-ogn-decode-and-ogn-rf.patch @@ -0,0 +1,63 @@ +From 2d5ae0932b8421d0b9cbd1d61bcc93cce7536aae Mon Sep 17 00:00:00 2001 +From: "Fabian P. Schmidt" +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 + diff --git a/debian/patches/series b/debian/patches/series index 93fb2e3..994ab3f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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