-
Notifications
You must be signed in to change notification settings - Fork 36
/
fr24feed.service
24 lines (20 loc) · 983 Bytes
/
fr24feed.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[Unit]
Description=Flightradar24 Decoder & Feeder
After=network-online.target
[Service]
Type=simple
Restart=always
ExecStartPre=-/bin/rm -f /dev/shm/decoder.txt
ExecStopPost=-/bin/rm -f /dev/shm/decoder.txt
ExecStart=/bin/bash -c "stdbuf -oL -eL /usr/bin/fr24feed | stdbuf -oL -eL sed -u -e 's/[0-9,-]* [0-9,:]* | //' | stdbuf -oL -eL grep -v -e '::on_periodic_refresh:' -e 'Synchronizing time via NTP' -e 'synchronized correctly' -e 'Pinging' -e 'time references AC' -e 'mlat.... [A-F,0-9]*' -e '.feed..n.ping ' -e 'syncing stream' -e 'saving bandwidth' | stdbuf -oL -eL perl -ne 'print if (not /mlat..i.Stats/ or ($n++ % 58 == 3)) and (not /feed....sent/ or ($m++ % 250 == 10)) and (not /sent.*aircraft/ or ($m++ % 250 == 10)) and (not /stats.sent/ or ($k++ % 6 == 1)) ;$|=1'"
LimitNOFILE=256
User=fr24
PermissionsStartOnly=true
SyslogIdentifier=fr24feed
SendSIGHUP=yes
TimeoutStopSec=5
RestartSec=0
StartLimitInterval=5
StartLimitBurst=20
[Install]
WantedBy=multi-user.target