Skip to content

Commit 09cc784

Browse files
committed
change path for adsbx uuid file
1 parent 6aad799 commit 09cc784

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

create-uuid.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/bin/bash
22

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
713

814
function aptInstall() {
915
if ! apt install -y --no-install-recommends --no-install-suggests "$@"; then
@@ -12,6 +18,7 @@ function aptInstall() {
1218
fi
1319
}
1420
function generateUUID() {
21+
# Let's make sure the UUID tools are installed...
1522
if ! command -v uuidgen &>/dev/null; then
1623
echo "Can't find uuidgen in path, trying to install uuidgen..."
1724
aptInstall uuid-runtime

uninstall.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ rm -f /lib/systemd/system/adsbexchange-mlat.service
1515
rm -f /lib/systemd/system/adsbexchange-mlat2.service
1616
rm -f /lib/systemd/system/adsbexchange-feed.service
1717

18+
cp -f "$IPATH/adsbx-uuid" /tmp/adsbx-uuid
1819
rm -rf "$IPATH"
20+
mkdir -p "$IPATH"
21+
mv -f /tmp/adsbx-uuid "$IPATH/adsbx-uuid"
1922

2023
set +x
2124

0 commit comments

Comments
 (0)