diff --git a/scripts/ogn-decode.service b/scripts/ogn-decode.service new file mode 100644 index 0000000..cc0448b --- /dev/null +++ b/scripts/ogn-decode.service @@ -0,0 +1,17 @@ +[Unit] +Description=Decode ogn/flarm data given by a fifo and forward it to glidernet.org +After=network.target time-sync.target + +[Service] +# Using a tty as StandardInput is needed as a workaround, +# since ogn-decode requires an interactive tty (as in: 'doesn't return EOF'), +# see also: https://github.com/glidernet/ogn-rf/issues/11 +StandardInput=tty-fail +StandardOutput=journal +TTYPath=/dev/tty3 +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..2737f62 --- /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=root +ExecStart=/usr/bin/ogn-rf /etc/rtlsdr-ogn.conf +Restart=on-failure + +[Install] +WantedBy=multi-user.target