You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
2.0 KiB

  1. #!/bin/bash -e
  2. install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  3. install -v -o 1000 -g 1000 -m 755 targets/enable.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  4. install -v -o 1000 -g 1000 -m 755 targets/disable.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  5. install -v -o 1000 -g 1000 -m 755 targets/configure_rbfeeder.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  6. install -v -o 1000 -g 1000 -m 755 targets/configure_fr24feed.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  7. install -v -o 1000 -g 1000 -m 755 targets/readsb-set-location "${ROOTFS_DIR}/usr/local/bin/"
  8. install -v -o 1000 -g 1000 -m 755 targets/readsb-gain "${ROOTFS_DIR}/usr/local/bin/"
  9. on_chroot << EOF
  10. cd "/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090"
  11. mkdir -p /usr/local/share/adsb-wiki/readsb-install
  12. apt-get update
  13. apt-get install --no-install-recommends --no-install-suggests -y git build-essential debhelper libusb-1.0-0-dev \
  14. pkg-config dh-systemd libncurses5-dev lighttpd zlib1g-dev zlib1g unzip
  15. rm -rf /usr/local/share/adsb-wiki/readsb-install/git
  16. if ! git clone --branch stale --depth 1 https://github.com/wiedehopf/readsb.git "/usr/local/share/adsb-wiki/readsb-install/git"
  17. then
  18. echo "Unable to git clone the repository"
  19. exit 1
  20. fi
  21. rm -rf /usr/local/share/adsb-wiki/readsb-install/readsb*.deb
  22. cd /usr/local/share/adsb-wiki/readsb-install/git
  23. export DEB_BUILD_OPTIONS=noddebs
  24. if ! dpkg-buildpackage -d -b -Prtlsdr -ui -uc -us
  25. then
  26. echo "Something went wrong building the debian package, exiting!"
  27. exit 1
  28. fi
  29. echo "Installing the Package"
  30. if ! dpkg --force-all -i ../readsb_*.deb
  31. then
  32. echo "Something went wrong installing the debian package, exiting!"
  33. exit 1
  34. fi
  35. echo "Package installed!"
  36. cp -n debian/lighttpd/* /etc/lighttpd/conf-available
  37. echo "[PiSDR] Disabling services. To enable them, run 'bash enable.sh'."
  38. systemctl disable --now readsb || true
  39. systemctl disable --now tar1090 || true
  40. systemctl disable --now lighttpd || true
  41. EOF