Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add systemd units for ogn-decode and ogn-rf #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions scripts/ogn-decode.service
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions scripts/ogn-decode.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Socket]
ListenFIFO=/var/run/ogn-decode.fifo
SocketUser=ogn

[Install]
WantedBy=sockets.target
11 changes: 11 additions & 0 deletions scripts/ogn-rf.service
Original file line number Diff line number Diff line change
@@ -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