File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- UUID_FILE=" /boot/adsbx-uuid"
4
-
5
- # Let's make sure the UUID tools are installed...
6
-
3
+ if [ -f /boot/adsb-config.txt ]; then
4
+ UUID_FILE=" /boot/adsbx-uuid"
5
+ else
6
+ mkdir -p /usr/local/share/adsbexchange
7
+ UUID_FILE=" /usr/local/share/adsbexchange/adsbx-uuid"
8
+ # move old file position
9
+ if [ -f /boot/adsbx-uuid ]; then
10
+ mv -f /boot/adsbx-uuid $UUID_FILE
11
+ fi
12
+ fi
7
13
8
14
function aptInstall() {
9
15
if ! apt install -y --no-install-recommends --no-install-suggests " $@ " ; then
@@ -12,6 +18,7 @@ function aptInstall() {
12
18
fi
13
19
}
14
20
function generateUUID() {
21
+ # Let's make sure the UUID tools are installed...
15
22
if ! command -v uuidgen & > /dev/null; then
16
23
echo " Can't find uuidgen in path, trying to install uuidgen..."
17
24
aptInstall uuid-runtime
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ rm -f /lib/systemd/system/adsbexchange-mlat.service
15
15
rm -f /lib/systemd/system/adsbexchange-mlat2.service
16
16
rm -f /lib/systemd/system/adsbexchange-feed.service
17
17
18
+ cp -f " $IPATH /adsbx-uuid" /tmp/adsbx-uuid
18
19
rm -rf " $IPATH "
20
+ mkdir -p " $IPATH "
21
+ mv -f /tmp/adsbx-uuid " $IPATH /adsbx-uuid"
19
22
20
23
set +x
21
24
You can’t perform that action at this time.
0 commit comments