From f895f85f1615c4abe55b4da01c88216c19f2d81e Mon Sep 17 00:00:00 2001 From: Luigi Cruz Date: Thu, 4 Mar 2021 17:00:14 -0300 Subject: [PATCH] Fix tar1090 installation. --- stage4/32-pisdr-dump1090/00-run.sh | 30 ++----------------- .../targets/install_tar1090.sh | 21 +++++++++++++ 2 files changed, 24 insertions(+), 27 deletions(-) create mode 100755 stage4/32-pisdr-dump1090/targets/install_tar1090.sh diff --git a/stage4/32-pisdr-dump1090/00-run.sh b/stage4/32-pisdr-dump1090/00-run.sh index 474a4ae..330bef7 100755 --- a/stage4/32-pisdr-dump1090/00-run.sh +++ b/stage4/32-pisdr-dump1090/00-run.sh @@ -48,34 +48,10 @@ echo "Package installed!" cp -n debian/lighttpd/* /etc/lighttpd/conf-available -echo -------------- -cd /usr/local/share/adsb-wiki/readsb-install - -wget -O tar1090-install.sh https://raw.githubusercontent.com/wiedehopf/tar1090/master/install.sh -bash tar1090-install.sh /run/readsb - -if ! systemctl show readsb | grep 'ExecMainStatus=0' -qs; then - echo -------------- - echo -------------- - journalctl -u readsb | tail -n30 - echo -------------- - echo -------------- - echo "ERROR: readsb service didn't start, if inquiring about the issue please post the above 30 lines of log!" - echo " common issues: SDR not plugged in." - echo " the webinterface will show an error until readsb is running!" - echo -------------- -fi - -echo -------------- - echo "[PiSDR] Disabling services. To enable them, run 'bash enable.sh'." -systemctl disable --now readsb -systemctl disable --now tar1090 -systemctl disable --now lighttpd - -echo "[PiSDR] Deleting build files to save space." +systemctl disable --now readsb || true +systemctl disable --now tar1090 || true +systemctl disable --now lighttpd || true -rm -fr /usr/local/share/tar1090/git-db -rm -fr /usr/local/share/tar1090/git EOF \ No newline at end of file diff --git a/stage4/32-pisdr-dump1090/targets/install_tar1090.sh b/stage4/32-pisdr-dump1090/targets/install_tar1090.sh new file mode 100755 index 0000000..64e68a0 --- /dev/null +++ b/stage4/32-pisdr-dump1090/targets/install_tar1090.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cd /usr/local/share/adsb-wiki/readsb-install + +wget -O tar1090-install.sh https://raw.githubusercontent.com/wiedehopf/tar1090/master/install.sh +bash tar1090-install.sh /run/readsb + +if ! systemctl show readsb | grep 'ExecMainStatus=0' -qs; then + echo -------------- + echo -------------- + journalctl -u readsb | tail -n30 + echo -------------- + echo -------------- + echo "ERROR: readsb service didn't start, if inquiring about the issue please post the above 30 lines of log!" + echo " common issues: SDR not plugged in." + echo " the webinterface will show an error until readsb is running!" + echo -------------- +fi + +rm -fr /usr/local/share/tar1090/git-db +rm -fr /usr/local/share/tar1090/git \ No newline at end of file