@@ -51,6 +51,22 @@ sed -i -e 's/RRATimespan 96048000/\0\nRRATimespan 576288000/' /etc/collectd/coll
51
51
sed -i -e ' s/XFF.*/XFF 0.8/' /etc/collectd/collectd.conf
52
52
sed -i -e ' s/skyview978/skyaware978/' /etc/collectd/collectd.conf
53
53
54
+ # unlisted interfaces
55
+ for path in /sys/class/net/*
56
+ do
57
+ iface=$( basename $path )
58
+ # no action on existing interfaces
59
+ fgrep -q ' Interface "' $iface ' "' /etc/collectd/collectd.conf && continue
60
+ # only add interface starting with et en and wl
61
+ case $iface in
62
+ et* |en* |wl* )
63
+ sed -i -e ' /<Plugin "interface">/{a\
64
+ Interface "' $iface ' "
65
+ }' /etc/collectd/collectd.conf
66
+ ;;
67
+ esac
68
+ done
69
+
54
70
rm -f /etc/cron.d/cron-graphs1090
55
71
cp -r html /usr/share/graphs1090
56
72
cp default /etc/default/graphs1090
@@ -59,6 +75,10 @@ cp collectd.conf /usr/share/graphs1090/default-collectd.conf
59
75
cp service.service /lib/systemd/system/graphs1090.service
60
76
cp nginx-graphs1090.conf /usr/share/graphs1090
61
77
78
+ echo " ------------------"
79
+ echo " TEST 1"
80
+ echo " ------------------"
81
+
62
82
if [ -d /etc/lighttpd/conf.d/ ] && ! [ -d /etc/lighttpd/conf-enabled/ ] && ! [ -d /etc/lighttpd/conf-available ] && command -v lighttpd & > /dev/null
63
83
then
64
84
ln -snf /etc/lighttpd/conf.d /etc/lighttpd/conf-enabled
69
89
lighttpd=yes
70
90
fi
71
91
92
+ echo " ------------------"
93
+ echo " TEST 2"
94
+ echo " ------------------"
95
+
72
96
if [[ $lighttpd == yes ]]; then
73
97
cp 88-graphs1090.conf /etc/lighttpd/conf-available
74
98
ln -snf /etc/lighttpd/conf-available/88-graphs1090.conf /etc/lighttpd/conf-enabled/88-graphs1090.conf
@@ -84,6 +108,10 @@ if [[ $lighttpd == yes ]]; then
84
108
fi
85
109
fi
86
110
111
+ echo " ------------------"
112
+ echo " TEST 3"
113
+ echo " ------------------"
114
+
87
115
SYM=/usr/share/graphs1090/data-symlink
88
116
mkdir -p $SYM
89
117
if [ -f /run/dump1090-fa/stats.json ]; then
@@ -106,6 +134,10 @@ else
106
134
sed -i -e ' s?URL .*?URL "file:///usr/share/graphs1090/data-symlink"?' /etc/collectd/collectd.conf
107
135
fi
108
136
137
+ echo " ------------------"
138
+ echo " TEST 4"
139
+ echo " ------------------"
140
+
109
141
SYM=/usr/share/graphs1090/978-symlink
110
142
mkdir -p $SYM
111
143
if [ -f /run/skyaware978/aircraft.json ]; then
@@ -118,19 +150,18 @@ else
118
150
sed -i -e ' s?.*URL_978 .*?#URL_978 "http://localhost/skyaware978"?' /etc/collectd/collectd.conf
119
151
fi
120
152
121
- if grep jessie /etc/os-release > /dev/null
122
- then
123
- echo --------------
124
- echo " Some features are not available on jessie!"
125
- echo --------------
126
- sed -i -e ' s/ADDNAN/+/' -e ' s/TRENDNAN/TREND/' -e ' s/MAXNAN/MAX/' -e ' s/MINNAN/MIN/' $ipath /graphs1090.sh
127
- sed -i -e ' /axis-format/d' $ipath /graphs1090.sh
128
- fi
153
+ echo " ------------------"
154
+ echo " TEST 5"
155
+ echo " ------------------"
129
156
130
157
if [[ $lighttpd == yes ]]; then
131
158
systemctl restart lighttpd
132
159
fi
133
160
161
+ echo " ------------------"
162
+ echo " TEST 6"
163
+ echo " ------------------"
164
+
134
165
systemctl enable collectd & > /dev/null
135
166
systemctl restart collectd & > /dev/null || true
136
167
@@ -157,6 +188,10 @@ if ! systemctl status collectd &>/dev/null; then
157
188
fi
158
189
fi
159
190
191
+ echo " ------------------"
192
+ echo " TEST 7"
193
+ echo " ------------------"
194
+
160
195
if ! [[ -f /usr/share/graphs1090/noMalarky ]]; then
161
196
bash $ipath /malarky.sh
162
197
fi
0 commit comments