@@ -38,33 +38,20 @@ wget --timeout=30 -q -O /tmp/master.zip https://github.com/wiedehopf/graphs1090/
38
38
unzip -q -o master.zip
39
39
cd /tmp/graphs1090-master
40
40
41
- CPU_AIR=/run/collectd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd
42
- if [[ -f " $CPU_AIR " ]]; then
43
- cp " $CPU_AIR " /run/collectd/dump1090_cpu-airspy.rrd
44
- rrdtool tune --maximum value:U /run/collectd/dump1090_cpu-airspy.rrd
45
- cp -f /run/collectd/dump1090_cpu-airspy.rrd " $CPU_AIR "
46
- fi
41
+ cp /run/collectd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd /run/collectd/dump1090_cpu-airspy.rrd
42
+ rrdtool tune --maximum value:U /run/collectd/dump1090_cpu-airspy.rrd
43
+ cp -f /run/collectd/dump1090_cpu-airspy.rrd /run/collectd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd
44
+ rrdtool tune --maximum value:U /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd
47
45
48
- systemctl stop collectd & > /dev/null || true
46
+ cp dump1090.db dump1090.py system_stats.py LICENSE /usr/share/graphs1090
47
+ cp * .sh /usr/share/graphs1090
48
+ cp malarky.conf /usr/share/graphs1090
49
+ chmod u+x /usr/share/graphs1090/* .sh
50
+ cp /etc/collectd/collectd.conf /etc/collectd/collectd.conf.graphs1090 & > /dev/null || true
51
+ cp collectd.conf /etc/collectd/collectd.conf
49
52
50
- if [[ -f /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd ]]; then
51
- rrdtool tune --maximum value:U /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-airspy.rrd
52
- fi
53
53
54
- cp dump1090.db dump1090.py system_stats.py LICENSE $ipath
55
- cp * .sh $ipath
56
- cp malarky.conf $ipath
57
- chmod u+x $ipath /* .sh
58
- if ! grep -e ' system_stats' -qs /etc/collectd/collectd.conf & > /dev/null; then
59
- cp /etc/collectd/collectd.conf /etc/collectd/collectd.conf.graphs1090 & > /dev/null || true
60
- cp collectd.conf /etc/collectd/collectd.conf
61
- echo " ------------------"
62
- echo " Overwriting /etc/collectd/collectd.conf, the old file has been moved to /etc/collectd/collectd.conf.graphs1090"
63
- echo " ------------------"
64
- fi
65
- if ! grep -qs -e ' RRATimespan 576288000' /etc/collectd/collectd.conf & > /dev/null; then
66
- sed -i -e ' s/RRATimespan 96048000/\0\nRRATimespan 576288000/' /etc/collectd/collectd.conf
67
- fi
54
+ sed -i -e ' s/RRATimespan 96048000/\0\nRRATimespan 576288000/' /etc/collectd/collectd.conf
68
55
sed -i -e ' s/XFF.*/XFF 0.8/' /etc/collectd/collectd.conf
69
56
sed -i -e ' s/skyview978/skyaware978/' /etc/collectd/collectd.conf
70
57
@@ -194,25 +181,6 @@ if ! [[ -f /usr/share/graphs1090/noMalarky ]]; then
194
181
bash $ipath /malarky.sh
195
182
fi
196
183
197
- systemctl enable graphs1090
198
- systemctl restart graphs1090
199
-
200
- # fix readonly remount logic in fr24feed update script
201
- sed -i -e ' s?$(mount | grep " on / " | grep rw)?{ mount | grep " on / " | grep rw; }?' /usr/lib/fr24/fr24feed_updater.sh & > /dev/null || true
202
-
203
- echo --------------
204
- echo --------------
205
- echo " All done! Graphs available at http://$( ip route get 1.2.3.4 | grep -m1 -o -P ' src \K[0-9,.]*' ) /graphs1090"
206
- echo " It may take up to 10 minutes until the first data is displayed"
207
-
208
-
209
- if command -v nginx & > /dev/null
210
- then
211
- echo --------------
212
- echo " To configure nginx for graphs1090, please add the following line(s) in the server {} section:"
213
- echo " include /usr/share/graphs1090/nginx-graphs1090.conf;"
214
- fi
215
-
216
184
# curl -sL https://github.com/wiedehopf/graphs1090/raw/master/install.sh | bash
217
185
218
186
# install tar1090
0 commit comments