-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall-rpimonitor.sh
executable file
·269 lines (245 loc) · 15 KB
/
install-rpimonitor.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#!/bin/bash
# Install rpimonitor on a pine64 running ubuntu (may work for debian also)
#
# Run latest version directly from github when logged in as root / sudo with
# wget -q -O - https://raw.githubusercontent.com/pfeerick/pine64-scripts/master/install-rpimonitor.sh | /bin/bash
#
# Original code lifted from http://kaiser-edv.de/tmp/4U4tkD/install-rpi-monitor-for-a64.sh
# Original code written by tkaiser, as well as assuggestions for a deriverative work
#
# This modification written by pfeerick
if [ "$(id -u)" != "0" ]; then
echo "This script must be executed as root. Exiting" >&2
exit 1
fi
useEncodedPublicKey()
{
echo -e "\nUsing backup copy of public key for Armbian package list"
cd /tmp && echo "LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IFNLUyAxLjEuNgpD
b21tZW50OiBIb3N0bmFt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State=$?
rm /tmp/keyfile
if [ $keyAddState -ne 0 ]; then
echo -e "\033[0;31m\nUnable to add backup public key... exiting\033[0m"
if [ -f /etc/apt/sources.list.d/armbian.list ]; then
#remove if not Armbian
if [ ! -f /etc/armbian-release ]; then rm /etc/apt/sources.list.d/armbian.list; fi
fi
exit 2
fi
else
echo -e "\033[0;31m\nUnable to use provided backup public key... exiting\033[0m"
if [ -f /etc/apt/sources.list.d/armbian.list ]; then
#remove if not Armbian
if [ ! -f /etc/armbian-release ]; then rm /etc/apt/sources.list.d/armbian.list; fi
fi
exit 1
fi
} #useEncodedPublicKey
PatchRPiMonitor_for_sun50iw1p1()
{
echo -e "\nNow patching RPi-Monitor to deal correctly with A64"
cd /etc/rpimonitor/ && echo "H4sIAGQt4VYAA+07a3fbNpb57F+B43ZG8kamRMmyvV7b56RJmmSnaX3yaGfPPDwQCUmsKVIDkLbV
Jv9pf8P+sr33AiBBirJsN92ze5ZoY4l4XNwX7gtUyDPuBWkyffL7tQG0o6Mj+oRW/6Tv/vDwcDwY
jQYj6B8ORsPxEzbsiyzoy2W0SJMoS2U/E4tlzDPRvxVJxOMvgneuMi4ZeyLTNLtr3rbx/6Pt92Bp
vaGADw8PNsh/NDwa+Vr+44MxfD4Z+KPxwfAJG3xpRJra/3P5f/WF2g78x/508YaJ20zyIIvShKEu
RbNccnyCYfiffZhHii25zFg6ZdlcVCexaRQLBjNCMY2SKJmxm3kUzFkIVoplKQIw8Nk8vYGe4hFA
LRhPQlggEs9s9n4pgmgaBawTJUGch6LDrsTqJpUh7sGveRTzCWwIcHgYMq635wSNCQAGOCIcfIwj
RTiv46tw/QRmpDwUocfM5mbLs9NpHsdAcjbHeevLz3EyY1unIcqISGUeduj1DXy0ZFXo2UyLhtNA
keVmBvMCEjKXwnJeANQkIK6VljpkeKqyfOmxlxzkp3CpgtXEGMWiUCQZSAYWR4khA5HReE9WIIo4
SoReh1oQIbkwyYgPwSiNDsqcJyVEyU7NCClNFJ4b9EtENA1WywAH3B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xhqKUSo4KlJKA0A9KWYr6O47ROHNHG8feLozMSCW2ce1ELgrQvG
Tuy0dfJh1UdsnX9UeLutU4+rfv+O+WvXVsQbc9FG0vPxha4Hgxi7IMaPAuFXYPgPB1IRnoGFVoi0
kZE6si4Yx73fAHWFV1BnwwdDIB0xOJUGUj0SzmOwMMpkcLBpJuuCKXgYQ2ykbCC9gMfHgnK11oDT
6Xj3x98A6FEyco6mVR3XOD8e2D2wqa5e+bTi1+IXEpBg4bsHYLfhRJyw0ZjeOD1hR2P2+QFgh+tg
Jb44uQtQ7luJbFvb2ta2trWtbW1rW9va1ra2ta1tbWtb29rWtra1rW1ta1vb2ta2trWtbW1rW9va
1ra2ta1tbWvbfdp/A41zs94AeAAA" | base64 --decode | tar xzf -
which systemctl >/dev/null 2>&1
case $? in
0)
# Jessie
systemctl restart rpimonitor >/dev/null 2>&1
;;
*)
# Wheezy|Trusty
/etc/init.d/rpimonitor stop >/dev/null 2>&1
/etc/init.d/rpimonitor start >/dev/null 2>&1
;;
esac
} # PatchRPiMonitor_for_sun50iw1p1
cleanupPackageLists()
{
echo -e "\nCleaning up package lists"
if [ -f /etc/apt/sources.list.d/armbian.list ]; then
#remove if not Armbian
if [ ! -f /etc/armbian-release ]; then
rm /etc/apt/sources.list.d/armbian.list
apt-key del 9F0E78D5 >/dev/null 2>&1
apt-get update
fi
fi
} # cleanupPackageLists
echo -e "$(date) Start RPi-Monitor installation\n"
echo -e "Checking for dpkg lock\c"
while true ; do
fuser /var/lib/dpkg/lock >/dev/null 2>&1 || break
sleep 3
echo -e ".\c"
done
echo -e "\nAdding Armbian package list"
if [ ! -f /etc/apt/sources.list.d/armbian.list ]; then
echo 'deb http://apt.armbian.com xenial main utils xenial-desktop' > \
/etc/apt/sources.list.d/armbian.list
apt-key adv --keyserver keys.gnupg.net --recv-keys 0x93D6889F9F0E78D5 >/dev/null 2>&1
if [ $? -ne 0 ]; then
useEncodedPublicKey
fi
fi
echo -e "\nUpdating package lists"
apt-get update
echo -e "\nInstalling rpimonitor (this may take several minutes)..."
apt-get -f -qq -y install rpimonitor
/usr/share/rpimonitor/scripts/updatePackagesStatus.pl &
cleanupPackageLists
PatchRPiMonitor_for_sun50iw1p1
echo -e "\n$(date) Finished RPi-Monitor installation"
echo -e " \nNow you're able to enjoy RPi-Monitor at http://$((ifconfig -a) | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p' | head -1):8888"