fix install readme. more ADSBx replacements

This commit is contained in:
Mark Bumiller 2023-01-27 07:38:58 -05:00
commit a5a83b3683
6 changed files with 15 additions and 15 deletions

View file

@ -1,13 +1,13 @@
#!/bin/bash
if [ -f /boot/adsb-config.txt ]; then
UUID_FILE="/boot/adsbfi-uuid"
UUID_FILE="/boot/adsbx-uuid"
else
mkdir -p /usr/local/share/adsbfi
UUID_FILE="/usr/local/share/adsbfi/adsbfi-uuid"
UUID_FILE="/usr/local/share/adsbfi/adsbx-uuid"
# move old file position
if [ -f /boot/adsbfi-uuid ]; then
mv -f /boot/adsbfi-uuid $UUID_FILE
if [ -f /boot/adsbx-uuid ]; then
mv -f /boot/adsbx-uuid $UUID_FILE
fi
fi

View file

@ -23,4 +23,4 @@ GIT="/usr/local/share/tar1090/git"
getGIT "$REPO" "$BRANCH" "$GIT"
bash "$GIT/install.sh" "/run/adsbfi-feed" "adsbfi"
bash "$GIT/install.sh" "/run/adsbfi-feed" "adsbx"

View file

@ -1,8 +1,8 @@
#!/bin/bash
if grep -qs -e 'LATITUDE' /boot/adsb-config.txt &>/dev/null && [[ -f /boot/adsbfi-env ]]; then
if grep -qs -e 'LATITUDE' /boot/adsb-config.txt &>/dev/null && [[ -f /boot/adsbx-env ]]; then
source /boot/adsb-config.txt
source /boot/adsbfi-env
source /boot/adsbx-env
else
source /etc/default/adsbfi
fi
@ -28,7 +28,7 @@ UAT_PORT=$(echo $UAT_INPUT | cut -d: -f2)
UAT_SOURCE="--net-connector $UAT_IP,$UAT_PORT,uat_in,silent_fail"
exec /usr/local/share/adsbfi/feed-adsbfi --net --net-only --quiet \
exec /usr/local/share/adsbfi/feed-adsbx --net --net-only --quiet \
--write-json /run/adsbfi-feed \
--net-beast-reduce-interval $REDUCE_INTERVAL \
$TARGET $NET_OPTIONS \

View file

@ -1,8 +1,8 @@
#!/bin/bash
if grep -qs -e 'LATITUDE' /boot/adsb-config.txt &>/dev/null && [[ -f /boot/adsbfi-env ]]; then
if grep -qs -e 'LATITUDE' /boot/adsb-config.txt &>/dev/null && [[ -f /boot/adsbx-env ]]; then
source /boot/adsb-config.txt
source /boot/adsbfi-env
source /boot/adsbx-env
else
source /etc/default/adsbfi
fi

View file

@ -40,7 +40,7 @@ WantedBy=default.target
EOF
if [[ -f /boot/adsb-config.txt ]]; then
sed -i -e 's#EnvironmentFile.*#EnvironmentFile=/boot/adsbfi-env\nEnvironmentFile=/boot/adsb-config.txt#' "$SERVICE"
sed -i -e 's#EnvironmentFile.*#EnvironmentFile=/boot/adsbx-env\nEnvironmentFile=/boot/adsb-config.txt#' "$SERVICE"
fi
sed -i -e "s/SERVERPORT/${1}/" "$SERVICE"

View file

@ -7,18 +7,18 @@ systemctl disable --now adsbfi-mlat
systemctl disable --now adsbfi-mlat2 &>/dev/null
systemctl disable --now adsbfi-feed
if [[ -d /usr/local/share/tar1090/html-adsbfi ]]; then
bash /usr/local/share/tar1090/uninstall.sh adsbfi
if [[ -d /usr/local/share/tar1090/html-adsbx ]]; then
bash /usr/local/share/tar1090/uninstall.sh adsbx
fi
rm -f /lib/systemd/system/adsbfi-mlat.service
rm -f /lib/systemd/system/adsbfi-mlat2.service
rm -f /lib/systemd/system/adsbfi-feed.service
cp -f "$IPATH/adsbfi-uuid" /tmp/adsbfi-uuid
cp -f "$IPATH/adsbx-uuid" /tmp/adsbx-uuid
rm -rf "$IPATH"
mkdir -p "$IPATH"
mv -f /tmp/adsbfi-uuid "$IPATH/adsbfi-uuid"
mv -f /tmp/adsbx-uuid "$IPATH/adsbx-uuid"
set +x